Monday, August 30, 2010

ssh without typing passwords

You can give an account on one machine (the client) permanent access to an account on another machine (the server) using ssh without always having to type a password.

You need to generate an ssh keypair on the client
Add the public key to the server's list of authorized keys

On the client

$ ssh-keygen

which should result in the creation of a .ssh directory containing and id_rsa
(you can specify a passphrase here which will be used once per session to unlock the key)

Copy to the server

On the server

$ cat >> $HOME/.ssh/authorized_keys

And you're done. Now ssh from client to server should not require a password.

No comments:

Post a Comment