Putty command line argument to change title

I need to launch putty through command line argument programmtically. I am doing this using the command as:

C:\Programs\putty.exe -ssh -l root -pw password hostname

which works fine.
Now I want to open the session with changed title of my choice. I know this can be done using

Disable remote-controller window title changing
and setting
Window title
But is there any way to pass these parameters as command line argument while launching? 6

2 Answers

I was able to get the putty SSH terminal session to change its title by following a few steps as I found in the Set PuTTY's window title to name of loaded session post on Server Fault.

Change Window Title of Putty Terminal Session

  1. From the PuTTY app go to Session and then define the Host Name, Port, and SSH connection type.

    enter image description here

  2. From Terminal -> Features, then checked the Disable remote-controlled window title changing option.

    enter image description here

  3. Go back to Session and then in Saved Sessions type in the hostname or session name you want that host to be defined as and press Save. You should not see that session in the list.

    enter image description here

  4. Now you can load the SSH session with PuTTY via the command line from that same PC but append the -loghost "My Title" for the title of the terminal window to have that value in it instead.

Command

C:\Programs\putty.exe -load "Hostname" -ssh -l root -pw Password Hostname -loghost "My Title"

enter image description here


Further Resources

5

what i do to make my life easier,

1) use mtputty application. 2) edit mtputty.xml file to create/import sessions 3) Under Tools menu > settings > general > check - "show display name", instead of "Replicate Putty window caption"

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like