On Windows I use PuTTY to log in to a remote server via SSH. I want to use a batch script to SSH to the remote server using PuTTY. The server is running a Linux-based OS.
I used the below command to do this:
start C:\Windows\System32\putty.exe -ssh server_name -l pankmish -pw wxyz
However I got the following error:
unable to connect to remote host
If I use this command instead:
start C:\Windows\System32\putty.exe -ssh server_name -l user_name
Everything works well and I get a PuTTY window with username "user_name" in it. If I provide the correct password I am able to connect to the server. However via a batch script I am not able to provide the password when prompted.
How can I solve this?