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 firstname.lastname@example.org Password: Last login: Tue Jan 28 14:14:51 2014 from 184.108.40.206 CentOS release 6.3 (Final) email@example.com:~> cd .ssh firstname.lastname@example.org:.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.
email@example.com:.ssh> cd .. firstname.lastname@example.org:~> chmod -R go-rwx ~/.ssh email@example.com:.ssh> exit you@localmachine:.ssh> ssh firstname.lastname@example.org Last login: Tue Jan 28 15:28:51 2014 from 220.127.116.11 CentOS release 6.3 (Final)