Putty session start from shortcut on port

13,621

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.

Share:
13,621

Related videos on Youtube

MikeJones
Author by

MikeJones

Updated on September 18, 2022

Comments

  • MikeJones
    MikeJones over 1 year

    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!

  • MikeJones
    MikeJones over 11 years
    Thank's but I don't under stand "profile", here is my UI i.imgur.com/vpIWe.png
  • MikeJones
    MikeJones over 11 years
    Ahaha, I'm such a moron, I tried -p port# and it didn't work, but I just tried -P port# (Capital "P") and it worked. Thanks.
  • kbulgrien
    kbulgrien over 11 years
    When you start PuTTY from the GUI, you get a PuTTY Configuration dialog. This is where you have a Category panel that has a lot of configuration options. If you set up your options, you can save them by going to Session and by creating a Saved Session. I guess then, in PuTTY terminology, what I am calling a profile is a saved session. Whatever name you give the saved session is the name put after the -load argument.
  • kbulgrien
    kbulgrien over 11 years
    Sorry, I am unable to view pictures from that domain from my network. The domain is blocked for me.