Is there a way to "auto login" in PuTTY with a password?

For some versions of PuTTY, it's as simple as one of:

putty.exe [email protected] -pw mypassword
putty.exe somewhere.com -l mylogin -pw mypassword

If you want to connect using SSH, use this:

putty.exe -ssh [email protected] -pw mypasswordforsomewherecom

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

For example:

  1. Create a shortcut on the 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" [email protected] -pw password
  5. Click OK

If your PuTTY does not support the pw parameter, you will need a public key as explained in:
Creating and Copying Your Key-Pair in PuTTY SSH Client (alternate up-to-date instruction source).


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


I use WinSCP to “auto login” in PuTTY with a password. It's free, contains plenty of features, was created in 2000 and is still activity maintained. (WinSCP Wikipedia page)

STEP 1:

  • Login to your winSCP.
  • Click Options > Preferences. Then Follow the screenshot below.

enter image description here

STEP 2:

  • Follow the screenshot below.

NOTE: Opening PuTTY from WinSCP can be done from either the login window, or from the SFTP window, which I find extremely handy:

enter image description here

Tags:

Putty