Using Mac OS X 10.5′s keychain for ssh

The version of ssh that comes with Mac OS X 10.5.6 has a -K option that stores your passphrases in your system’s keychain.

Run this:

ssh-add -K [path to private keyfile]

Provide your passphrase once when asked, and keychain will provide the passphrase for you automatically. You should probably enable “Require password to wake this computer from sleep or screen saver” in the Security pane of the System Preferences if you decide to do this.

If you see

$ ssh-add -K
ssh-add: illegal option -- K

it’s because you’re using the macports (or fink) version of ssh. (run ‘which ssh’ to find out). With macports, uninstall the “openssh” package:

sudo port uninstall openssh

The ‘-K’ option was discovered courtesy of http://www-uxsup.csx.cam.ac.uk/~aia21/osx/leopard-ssh.html.

http://kimmo.suominen.com/docs/ssh/ has some excellent ssh documentation.

Related posts:

  1. How to delete an iPhone application
    Click the home button, flick to the page that has the icon of the application or bookmark that you want to remove, and then tap and hold for a second.......

  • Trenton

    Do you mean 10.6… or 10.5?

  • http://matthew.mceachen.us matthew

    I brainfarted — I meant 10.5.6.

  • http://www.resumewritingservice.biz/ first resume

    It’s a really useful discovery! Thanks for posting :)