Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Have you tried adding a -Q switch to the command line? It connects to an existing ssh-agent instead of starting a new one... –  Deer Hunter Jan 13 '13 at 9:39
    
I have tried that but it still does not prompt me for pass-phrases of private keys specified on the key chain command-line in ~/.bash_profile: –  user153199 Jan 13 '13 at 23:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.