Pre-requisites for Debian users =============================== :: apt-get install keychain Pre-requisites for Gentoo users =============================== :: emerge keychain All users should do this ======================== 1. Generate your private and public keys:: ssh-keygen -t rsa # hit to accept /home/username/.ssh/id_rsa # Type in a good passphrase (twice) 2. Copy your public key to the remote server:: cat ~/.ssh/id_rsa.pub | ssh username@remotehost 'cat >> ~/.ssh/authorized_keys' 3. Copy and paste the following lines into your ~/.bashrc file on localhost:: keychain id_rsa [[ -f $HOME/.keychain/$HOSTNAME-sh ]] && \ source $HOME/.keychain/$HOSTNAME-sh 4. Open a new terminal or shell. Every new shell that runs will now start keychain. After logging in to keychain, you should be able to connect to remotehost without using any password, e.g.:: ssh username@remotehost # should log you in without asking for any passwords