Micro-recipe to avoid entering your password each time you do an ssh or an scp from a local machine to a remote one.
Local machine (enter passphrase each time) ->
- ssh-keygen -t rsa1
- ssh-keygen -t dsa
- ssh-keygen -t rsa (if you do only one, do this one)
- Append the content of each of the local ~/.ssh/identity.pub, ~/.ssh/id_dsa.pub, ~/.ssh/id_rsa.pub files to the remote ~/.ssh/authorized_keys one each time on a separate line.
- Execute this script every time you restart your linux box to start the ssh agent.
ssh-agent >$ssh_info_file
chmod 600 $ssh_info_file
. $ssh_info_file
for i in identity id_dsa id_rsa
do
ssh-add ~/.ssh/$i
done
Attach each shell to the ssh agent.
- . ~/.ssh-agent-info-`hostname`
