PuTTY shortcut using target: How to specify port?

2

1

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?

SJ19

Posted 2018-02-26T18:20:07.630

Reputation: 123

Answers

3

From the documentation:

... -P otherport ...

Ignacio Vazquez-Abrams

Posted 2018-02-26T18:20:07.630

Reputation: 100 516

-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.

gaut

Posted 2018-02-26T18:20:07.630

Reputation: 1

This answer is wrong. You have to use the -P parameter to specify the port. – I say Reinstate Monica – 2019-08-03T10:24:27.880