Sick of being asked for your password? Set up SSH authorised keys and forget about it!
you@localmachine:~> ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/a/.ssh/id_rsa): Created directory '/home/you/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/you/.ssh/id_rsa. Your public key has been saved in /home/you/.ssh/id_rsa.pub. The key fingerprint is: 3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 you@localmachine you@localmachine:~> chmod -R go-rwx ~/.ssh
Now copy the contents of /home/you/.ssh/id_rsa.pub, and SSH in for the last time with your password to your remote machine:
you@localmachine:~> ssh email@example.com Password: Last login: Tue Jan 28 14:14:51 2014 from 220.127.116.11 CentOS release 6.3 (Final) firstname.lastname@example.org:~> cd .ssh email@example.com:.ssh> nano authorized_keys
Paste in the contents you copied from your public key file. Make sure it is all on ONE LINE. Save and exit.
firstname.lastname@example.org:.ssh> cd .. email@example.com:~> chmod -R go-rwx ~/.ssh firstname.lastname@example.org:.ssh> exit you@localmachine:.ssh> ssh email@example.com Last login: Tue Jan 28 15:28:51 2014 from 18.104.22.168 CentOS release 6.3 (Final)