Password-less SSH

Warning: This content was posted a while ago and may be incorrect by now. Please search for more recent guidance with your preferred search engine.

Want to SSH into your server without having to enter the password each time? Read on.

On your local machine in Terminal:

ssh-keygen -t rsa
scp ~/.ssh/ remote:~/
ssh username@remote

Enter your password and then on the remote server:

cat ~/ >> ~/.ssh/authorized_keys
chmod 644 ~/.ssh/authorized_keys

And finally on your local machine again:

ssh username@remote

You should now have been able to SSH in without having to enter your password.