Is there a way to "auto login" in PuTTY with a password?
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?
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:
- Create a shortcut on the desktop to putty.exe
-
Rename the shortcut to
PuTTY - server.com
- Right-click shortcut and choose Properties
- Modify the target similar to:
"C:\Program Files\PuTTY\putty.exe" [email protected] -pw password
- 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.
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:
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.
PuTTY Connection Manager is a separate program that works with PuTTY. It can autologin and has an encrypted database holding the passwords.
I still prefer SSH keys though.
(Another downside is that it may no longer be supported by its original developer(s), and may only be available to download from third-party sources.)