How To SSH Without Passwords
As a note to myself and others who want to do the same thing, here’s how to generate SSH keys to not have to enter your password each time you need to do something remotely and securely.
Generate a key pair using ssh-keygen, copy the public key to the remote host and place it in .ssh/authorized_keys (or authorized_keys2 for an SSH2 key). Then copy the private key to .ssh/identity on your local machine. Now everything’s set for unhindered ssh’ing.