Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

It seems that ssh-add -K ~/.ssh/id_rsa will load your key but will ask for the password each time you reboot.

I am looking for a solution that would not require me to re-enter the key password between logins.

share|improve this question
    
Can you say a little more about when the password prompt comes up for you? I ask because I have an ssh-key for a remote server, which I assure you is not the same as my Mac login password or anything, and I haven't had to enter the password for the ssh-key for years. I can just open up a terminal, type "ssh <server>", and I'm there. I think I first set this key up under OSX 10.5. id_dsa, but I don't think that should matter. –  khedron Apr 13 '12 at 16:39
    
My id_rsa key has a password on it. –  sorin Apr 13 '12 at 16:46
    
I also have the problem that I solved this so long ago that I can't remember exactly what I did. But I think the idea is to not run ssh-add, but just run ssh directly. You should get a window popping up that will as the pass phrase for the key, and with a checkbox to let you store it in your keychain. –  Harald Hanche-Olsen Apr 13 '12 at 18:19
1  
@Sorin - so does mine! I had to enter it once, long ago, and the Mac has saved it for me ever since. Hopefully Harald's advice will help. –  khedron Apr 13 '12 at 18:35
    
Do you mean the Keychain password (i.e. your login password) or the key's passphrase? If it's the latter, re your passphrases definitely stored in Keychain? You can check this by opening Keychain Access and looking for it in the login keychain. –  Mathew Hall Apr 20 '12 at 11:41
show 1 more comment

1 Answer

Add the public key in:

.ssh/known_hosts

Public key usually are on:

/home/user/.ssh/id_rsa.pub

Hope that helps

share|improve this answer
1  
I think mean the authorized_keys –  Rene Larsen May 23 '12 at 18:47
    
Anyway, this doesn't work if you have more than one key! –  sorin May 24 '12 at 10:01
add comment

Your Answer

 
discard

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.