It should Just Work. In more detail: First, don't run ssh-agent
yourself, since launchd will run it for you on demand. Make sure your private ssh key is in ~/.ssh/
with appropriate permissions, i.e., not readable by anybody but yourself:
; ls -l .ssh/id_dsa
-rw------- 1 user 13799 736 Oct 12 2001 .ssh/id_dsa
Now run ssh remote-hostname
. A dialog should pop up to let you unlock the key. The dialog has a check button for storing the pass phrase in your keychain. Check it, and hit OK. (You need to do this with /usr/bin/ssh
, I think, and not any ssh
that you might have from macports or fink.) If you don't get the dialog, it could be that ssh
needs to be told about the name and location of your private key. If so, specify it using the -i
flag, as in
ssh -i .ssh/id_dsa remote-hostname