Sometimes you work with your remote host so much, that having to enter a password every time becomes a real pain. If that is the case, you should follow with this instructions to set up automatic handshake with your remote host.
First off, you have to have OpenSSH on both the host and your local machine. SSH into your remote host to create the “.ssh” directory in your home folder.
Now we are going to use the SSH Key Generator to create the authorized key.
ssh-keygen -t dsa
You will be prompted to enter a passphrase for this identity key. Choose something hard to break.
Now all you have to do is copy the identity key to the remote host.
scp ~/.ssh/id_dsa.pub myuser@remote.host.com:.ssh/authorized_keys2
Of course, you will replace “myuser@remove.host.com” with your actual remote host’s access information. Now, you will run a simple script that will tell the remote host which identity it should use, and also starts a new shell that will enable you to SSH to the remote host without entering any passwords.
ssh-agent sh -c 'ssh-add < /dev/null && bash'
Now try typing “ssh myuser@remote.host.com” and you will see that you are all set.
Instead of the scp line, consider using ssh-copy-id. Also, I think most people use:
eval `ssh-agent` in their .Xsession or a similarly placed script for their X environment so as to share a common ssh-agent.
Hmmm, cool. Well, at the time of writing this I wasn’t aware of the `ssh-copy-id`. But I ended up knowing about it eventually.
Thanks for the comment, though. Much appreciated.