Skip to content

Automatic logins

Chris West edited this page Aug 11, 2013 · 2 revisions

PuTTYTray can help you log in automatically without having disgusting saved passwords, using standard SSH keys. This is more secure and standard, better supported by onwards/downstream tools, but a bit of a pain to set up. Since p0.63-t016, PuTTYTray has tried to help with this:

  1. From the PuTTYTray configuration screen, start the Agent.
  2. From the Pageant Key List the appears, click Add ~/.ssh/id_rsa. This will pick up the key you use for OpenSSH (i.e. git) if it exists, or will offer to generate you one. If you already have one, and hence don't get this prompt, you can skip to using the key. pageant offering to generate a key
  3. PuTTYgen will ask you to move the mouse around a bit, then will ask if you want to password protect this key. If your computer is secure (remains locked/off all the time, and is not shared with others, etc.), the password is less necessary. pageant prompting for a password
  4. You should now have the key shown in the Pageant Key List. Pageant has some settings you might want from it's system tray icon: "Persist keys" causes it to remember added keys across application restarts (but not the passphrases for them), and "Start with Windows" causes pageant to start itself with Windows. If you tick both, you will be prompted for passwords when you log in (if you have any), then will be able to immediately connect to any machines. pageant with ticked settings
  5. Click "Copy OpenSSH public keys". This places the public keys on the clipboard.
  6. Log into the target machine with a password (for the last time!).
  7. Open ~/.ssh/authorized_keys in your favourite text editor. You might need to create ~/.ssh first.
  8. Paste the fingerprints into the file, save and exit. vim with a key pasted into it
  9. Log out, and attempt to log back in. You should be logged straight in, not asked for a password.
Something went wrong with that request. Please try again.