4

I'd like to create a shortcut for connecting to my web server + logging in on Putty. The following has always worked for me but I recently have gotten a new web host that connects with a port other than the default 22, thus my normal target line doesn't work anymore:

"C:\Program Files\PuTTY\putty.exe" <user>@<host> -pw <password>

How do I to specify the port?

2 Answers 2

5

From the documentation:

... -P otherport ...
-3
@echo off 
C: 
cd \Program Files\PuTTY
start putty.exe -ssh user@IP 22(port) -pw 1234566789(psswrd)
exit 

Put this in a text file and then all you have to do is change the extension to .bat and then double click it to open a session with your user.

1
  • This answer is wrong. You have to use the -P parameter to specify the port. Aug 3, 2019 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .