The ssh-agent on my Mac causes a pop-up for certain hosts:

[me@my-laptop]$ ssh cargo2

Last login: Tue Aug  3 09:26:43 2010 from trainwreck.arlut.utexas.edu
[me@cargo2]$

But for other hosts:

[me@my-laptop]$ ssh red

And then I get the dreaded "Enter your password for the SSH key 'id_rsa'." pop-up. I know the ssh-agent is running and working because it worked for the first host.

How do I stop the pop-up for all hosts and make it always use the ssh-agent?

For reference:

$ ssh-add -l
2048 <hex value> /Users/me/.ssh/id_rsa (RSA)

$ ps aux | grep ssh-agent
me    1393   0.0  0.0  2445984   1572   ??  Ss    9:18AM   0:00.10 ssh-agent -s

$ env | grep -i ssh
SSH_AGENT_PID=1393
SSH_AUTH_SOCK=/tmp/ssh-UW4rDdw1jw/agent.1391
link|improve this question

77% accept rate
I assume you mean the OS X Keychain popup? Honestly, the thing is a godsend. But anyway… weird that some times you get it, some times you don't. – kch Aug 3 '10 at 14:53
Related: superuser.com/questions/73387/… – kch Aug 3 '10 at 14:57
Also, you probably want to do some reading under the Keychain Integration section here: dribin.org/dave/blog/archives/2007/11/28/ssh_agent_leopard – kch Aug 3 '10 at 14:58
Lastly, you may want the reverse of this: superuser.com/questions/88470/… – kch Aug 3 '10 at 15:00
1  
@aaron that's weird. Try searching for id_dsa/id_rsa. Did you manage to find your answer in any of the linked urls or do you still need help with this? – kch Aug 6 '10 at 15:01
show 3 more comments
feedback

3 Answers

The same thing happened to me if ~/.ssh/id_rsa existed but ~/.ssh/id_rsa.pub did not, if you delete the pub file auth with the key still works but asks for your password every time

link|improve this answer
feedback

Do you use different identities for these two hosts set up in ~/.ssh/config (or elsewhere)?

If you have different identities, then one might not be configured in the OS X keychain. This blog entry (not mine, just found via google) discusses how keychain works with ssh-agent in OS X Leopard.

link|improve this answer
I don't have a ~/.ssh/config file, and the system config files are the defaults that were installed a couple of days ago w/ the OS. I looked through /etc/ssh_config and everything is still commented out. – aaron Aug 3 '10 at 17:28
feedback
up vote 0 down vote accepted

It turns out that I had copied my id_rsa and id_rsa.pub files from another laptop. I copied the pub key to the servers I was trying to log into, and for some reason one of them accepted the key with a client hostname mis-match and the other did not.

To fix the problem I had to generate a new public/private key pair and distribute that.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.