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

My ~/.profile contains the following:

if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
 eval `keychain --eval id_rsa git-key`

As expected, I am prompted for a password on login and ssh-agent is started. However, it ends up only having the key id_rsa (verified via "ssh-add -l"). It doesn't load git-key into ssh-agent even though it and id_rsa have the same password. If I then run:

eval `keychain --eval id_rsa git-key`

from the command line git-key is also loaded and ssh-agent now has both keys.

My question is, why is only one of the two keys getting loaded on login?

share|improve this question
up vote 0 down vote accepted

Doh! I use git to keep my .profile and other configs synced between several machines. My latest git merge didn't merge the way I expected so I had two different lines with calls to keychain only one of which was getting executed.

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.