Thursday, April 26, 2007

Puffing with SSHKeychain

In one of my previous articles I showed how you could use ssh-agent to your advantage to maximize lackadaisicalness. I have since then moved from the Ubuntu laptop that I was using at the time to my Mac that became available again.

I was looking for a nice and neat way to integrate ssh-agent into the Mac environment but could not get my shell scripting approach to gel elegantly. While doing the obligatory search on the web I found and fell in love with SSHKeychain.

This little app does all the had work (running ssh-agent from the correct place and exporting your keys into memory with ssh-add) for you, and more ... It not only handles the ssh-agent side of things but also provide support for integrating with the Apple Keychain and forward local ports over a ssh connection to set up ssh tunnels.

Go see the full feature list for more info.

Installation
Here are the step from their site:
  • Download SSHKeychain.dmg and mount it.
  • Copy SSHKeychain (SSHKeychain.app) to your Applications folder.
  • Run SSHKeychain. This should open a dock item and a statusbar item.
  • Click either the Statusbar Item, the Dock Item, or Main Menu and open the Preferences.
  • Open the Environment tab.
  • Enable "Manage global environment variables". This will make SSHKeychain available for other applications.
  • Open the keys tab and see if any of your keys are missing (~/.ssh/id_dsa and ~/.ssh/identity are default).
  • Re-login to make the global variables work.
  • Start up SSHKeychain, and you're set.
I added SSHKeychain to my Login Items in the System Preferences panel to ensure the app was running after a restart or log out/in sequence.

Setup
If you followed the installation instructions above there should be nothing further to do (assuming you had some pre-created keys in the default place like I had).

Excellent!

When I now fire Terminal.app up and log into a box that has my public key on it no password is required and I am logged in without further ado.

No comments:

About Me

My photo
I love solving real-world problems with code and systems (web apps, distributed systems and all the bits and pieces in-between).