Is there a way to configure a password for a stored session in PUTTY?

I know there is the capability to specify an "auto-login username" (under Connection/Data) but is there a way to do the same with the 'password'?

link|improve this question

Use KiTTy... its developed using PuTTy source code.. – Sachin Shekhar Apr 13 at 12:52
feedback

10 Answers

up vote 37 down vote accepted

For some versions of Putty it's as simple as:

putty.exe root@somewhere.com -pw mypasswordforsomewherecom

For those using Windows, you can simply create a shortcut and pass in these parameters.
For example:

  1. Create a shortcut on desktop to putty.exe
  2. Rename the shortcut to "PuTTY - server.com"
  3. Right-click shortcut and choose Properties
  4. Modify the target similar to:
    "C:\Program Files\PuTTY\putty.exe" user@server.com -pw password
  5. Click OK

If your putty does not support the pw parameter, you will need a public key as explained here :
"Creating and Copying Your Key-Pair in PuTTY SSH Client".

link|improve this answer
feedback

Strongly advise using the public key mechanisms rather than sending passwords from the shell.
Here is one more reference for the setup.

Link to get latest PuTTY binaries (and check the FAQ).

link|improve this answer
feedback

harrymc's answer is the best option.

The Putty FAQ makes it clear there's no way in the settings to store a password.

link|improve this answer
feedback

Putty Connection Manager can autologin, and has an encrypted database holding the passwords.

I still prefer ssh keys though.

link|improve this answer
feedback

I use mRemote on Windows; it can store usernames and passwords for SSH, RDP, VNC and Citrix.

link|improve this answer
+1 Nice application! – Matěj Zábský Oct 17 '11 at 12:59
I found this pretty buggy on Win7. Dragging the window around caused major hangs. Shame because apart from that it is great. – jsims281 Jan 11 at 16:51
feedback

If you want to preserve saved options (such as pre-configured window sizes and tunnel proxy) and load a saved session to auto-login, use this approach: http://www.shanghaiwebhosting.com/web-hosting/putty-ssh-auto-login

putty.exe -load my_server -l your_user_name -pw your_password

Where 'my_server' is a saved session name.

link|improve this answer
feedback

Tunnelier - saved passwords encrypted locally. It also has a sFTP GUI as well as SSH windows.

enter image description here

link|improve this answer
feedback

if command history is a security concern, go the public key route (as your plaintext password specified in the -pw option is stored in command history).

link|improve this answer
feedback

if you use the following way, don't forget to add "" to enclose your session name, e.g. putty.exe -load "my session name", or it may fail to load session.

putty.exe -load my_server -l your_user_name -pw your_password
link|improve this answer
feedback

i prefer doing like this on windows machine.

save the putty in a folder say "mytools"and run the command from command prompt.

tools>mytools 10 

10 is the last octet of your ip address. that's it

@ECHO OFF
set PUTTY=E:\tools\putty.exe
start %PUTTY% root@192.168.1. %1 -pw yourpassword
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.