Aide Memoir: Setting up auto logins with SSH

This is something that I always forget how to do. Here is the recipe adapted from Linux Server Hacks.



  1. First generate your key
    $ ssh-keygen -t rsa

This created two files, ~/.ssh/id_rsa and ~/.ssh/
5. Then copy the key pair to the host you want to login to

$ ssh -l userserver “mkdir .ssh; chmod 0700 .ssh”*
$ scp .ssh/ *user
6. Now you can login using
$ ssh -l eechrisserver**

and you don’t need a password. Exchange of public keys authenticates you.