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. Installing git with MacPorts
    The Good: MacPorts makes git, the new source version control system hotness, available to Mac users. The Bad: MacPorts sometimes has attitude, and poops out trying to compile or install......
  2. Quick MacPorts Installation of Ruby on Rails
    I finally got to walking through a great gentle introductory ALA article on Ruby on Rails. I wanted to run rails Demo to build my first project, but I got......
  3. Apache2, PHP, and MySQL on Mac OS X using MacPorts
    1. Install MacPorts Follow the instructions here: http://www.macports.org/install.php. 2. Install apache2 sudo port install apache2 Note that the macports instructions suggest installing the launchctl script now, but we’ll do that......
  4. How to Convert Your Book’s Images to Kindle
    Taking your painstakingly typeset book and shoving it through the kindle “conversion” meatgrinder was an exercise in wincing. Most of the images were corrupted, there was whitespace sprinkled randomly throughout......

This entry was posted in Technical HOWTOs and tagged , , . Bookmark the permalink.

2 Responses to Using Mac OS X 10.5′s keychain for ssh

  1. Trenton says:

    Do you mean 10.6… or 10.5?

  2. matthew says:

    I brainfarted — I meant 10.5.6.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Additional comments powered by BackType