Automating running command on Linux from Windows using PuTTY

Putty usually comes with the “plink” utility. This is essentially the “ssh” command line command implemented as a windows .exe. It pretty well documented in the putty manual under “Using the command line tool plink”. You just need to wrap a command like: plink root@myserver /etc/backups/do-backup.sh in a .bat script. You can also use common … Read more

How to ssh connect through Python Paramiko with ppk public key

Ok @Adam and @Kimvais were right, Paramiko cannot parse .ppk files. So the way to go (thanks to @JimB too) is to convert .ppk file to OpenSSH private key format; this can be achieved using PuTTYgen as described here. Then it’s very simple getting connected with it: import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(‘<hostname>’, username=”<username>”, … Read more

Linux Terminal: typing feedback gone, line breaks not displayed

Execute the command reset and your terminal should be restored (reference). This issue happens generally when dumping binary data to the terminal STDOUT which when the escape codes received are processed can do anything from change the color of the text, disable echo, even change character set. The easy way to avoid this is to … Read more

Git Bash and Pageant are not using keys

This is what ended up working for me. BTW, I do have Bash on Windows as well, but I don’t think that matters. I had Sourcetree installed and pointed at its folder with plink.exe, puttygen.exe, & pageant.exe. You could also download and install these separately as well. Configure Windows Environment Variable Type Environment into your … Read more

How to download a file from my server using SSH (using PuTTY on Windows)

There’s no way to initiate a file transfer back to/from local Windows from a SSH session opened in PuTTY window. Though PuTTY supports connection-sharing. While you still need to run a compatible file transfer client (pscp or psftp), no new login is required, it automatically (if enabled) makes use of an existing PuTTY session. To … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)