Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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
share|improve this question
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:… – kch Aug 3 '10 at 14:57
Also, you probably want to do some reading under the Keychain Integration section here: – kch Aug 3 '10 at 14:58
Lastly, you may want the reverse of this:… – kch Aug 3 '10 at 15:00
@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

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

share|improve this answer
Thanks, this fixed the problem. I had to generate a new file. If you want to generate a new from id_rsa, run this command in your ~/.ssh folder: ssh-keygen -y -f id_rsa > ( – Chris Bier Jul 11 '13 at 13:20
up vote 1 down vote accepted

It turns out that I had copied my id_rsa and 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.

share|improve this answer

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.

share|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

it worked for me on my mac lion with this command: rm ~/.ssh/*

share|improve this answer

Your Answer


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

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