Pages

Thursday, August 23, 2012

Automatic Login with Putty

To automatically log in to a remote SSH server with Putty client (from Windows), do the following:

On the Client:

  • generate a new key with PuttyGen
    • save the private key into a .ppk file
    • copy the public key string from the text box at the top and paste into authorized_keys file on the server
  • In Putty Session, go to Connection->SSH->Auth and add the private key for authentication.
  • Run pageant and add the key file with the pass phrase to it.

On the Server:

  • in your ~/.ssh/ directory create authorized_keys file
  • chmod 600 authorized_keys
  • make sure that, in sshd_config, only authorized_keys file is used to check for allowed keys


Sources:
Putty public keys (link)
ssh authorized_keys (link)
How to fix "Server refused our key"; comments (link)
Store passwords in Putty (link)

No comments: