Uninstall SSHKeychain

I recently upgraded from Mac OS X 10.4.11 to 10.5.8. Unlike Tiger, Leopard comes with it’s own ssh-agent which is tied into keychain which can remember the passwords for your ssh keys. I had SSHKeychain installed on Tiger so that I did not have to enter my key password when I connected using ssh but now that I am on Leopard I no longer need this.

The problem I faced after I had upgraded was that SSH_AUTH_SOCK was pointing to SSHKeychain instead of Leopard’s ssh agent. In order to remove the command line variables created by SSHKeychain you need to open .MacOSX/environment.plist with the text editor of your choice (I used vim) and remove the following lines.

[source]
<key>SSH_AGENT_PID</key>
<string>98</string>
<key>SSH_ASKPASS</key>
<string>/Applications/Utilities/sshAskPass.app/Contents/MacOS/sshAskPass
<key>SSH_AUTH_SOCK</key>
<string>/tmp/ssh-P8OlI2R0CM/agent.97</string>
[/source]

Once you have removed these lines reboot your mac. Once booted Keychain should now be managing your keychains. If not open Terminal and type ssh-add -k, this will add the default public keys to the agent.

I hope you found this information helpful. I had to look about for a while before I accidently stumbled across a website with this information.

Leave a Reply