I am running an Ubuntu web server and have setup RSA public/private keys so that I can backup over to my windows server securely. I have tested backing up my system over SFTP and it works fine. I have recently scripted the backup process but I am running into an issue with private key pass phrase that I have to type every single time. I decided to give keychain a try to get over this problem.
I went ahead and installed keychain 2.7.1 and have configured my .bash_profile with the following line:
eval `keychain --eval id_rsa`
so that I get prompted for the password when I SSH into my server and have that save by the SSH-agent so that I don't have to retype it every single time. The problem with the above is that I never get prompted for a password. When I SSH into my server I get the following:
* keychain 2.7.1 ~ http://www.funtoo.org
* Starting ssh-agent...
and on subsequent logon attempts I get the following:
* keychain 2.7.1 ~ http://www.funtoo.org
* Found existing ssh-agent: 1760
I followed the documentation on their site here:
http://www.funtoo.org/wiki/Keychain
but it does not seem to work. I can do a manual ssh-add after login in and I get prompted for the passphrase on my private key and this works fine. I am not sure what I am doing wrong with keychain and why it isn't prompting at the beginning?