Putty it’s the best SSH client for Microsoft Windows out there, it’s free, it’s open source and supports many protocols, for productivity reasons sometimes we need to auto login.
Local host: Microsoft Windows
Remote host: Linux or Unix with OpenSSH Server
Download Putty https://www.chiark.greenend.org.uk/~sgtatham/putty/docs.html
Fast, not recommended for security reasons, password will be stored in plain text.
1. Create a shortcut for putty.exe
2. Select the properties for the created shortcut and add to the “Target” text box:
Public and private key pair method, this is recommended.
1. Download and open puttygen.exe from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
a.) Generate the keys, click “Generate” and move the mouse over the blank are
b.) Save the keys, click “Save public key” and “Save private key” (without a passphrase)
c.) Copy the public key from “Public key for pasting into OpenSSH authorized_keys file” text box.
2. Login into the remote host with the user used for auto login
a.) Create .ssh directory in the home folder and set permission.
chmod 700 ~/.ssh
b.) Edit ~/.ssh/authorized_keys, paste the public key from PuTTy Key Generator (see 1/c) and set permission.
chmod 600 ~/.ssh/authorized_keys
3. Open Putty
Create a new session with the following information.
Putty > Session > Host Name ( or IP address ): remote_host
Putty > Session > Saved Sessions: remote_host
Putty > Connection > Data > Auto-login username: my_user
Putty > Connection > Data > SSH > Auth > Private key file for authentication: click browse and select the private key
Putty > Session > Save
You are ready! Open Putty and load the saved session, auto login should work!
4. ( Optional ) Create a shortcut for putty, go to properties and add -load remote_host (session name) to the “Target” text box.
One Reply to “SSH auto login with Putty from Windows”