Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Putty session start from shortcut on port [closed]

Tags:

ssh

putty

so I use a shortcut to load a session from user/password on default port like so below:

.\putty.exe [email protected]..-pw PASSWORD

I have changed my SSH port on the server from 22, to something else. How can I make that shortcut load on a port too? like Ex: -port 09?

Also, inside a batch file can I make it load a putty session like so above and send a command?

Thanks!

like image 597
MikeJones Avatar asked Dec 11 '22 20:12

MikeJones


1 Answers

Create a putty profile in a saved session, and then call it from the command line like:

putty.exe -load my_putty_profile

It is possible to put ssh remote commands in the profile (under Connection | SSH).

Specify the port in the profile, or alternatively, use the -P port command-line argument.

like image 177
kbulgrien Avatar answered Dec 21 '22 18:12

kbulgrien