Enable SSH Agent (Key) Forwarding on Snow Leopard
I’m using Git and Capistrano to deploy some Ruby applications on multiple servers. My Git setup is done with gitosis, which uses key-based authentication over SSH. The deployment script logs into the remote servers and checks out the current application version via Git.
To make this work, one must forward the private key, used for authentication with Git, to the server which performs the check. This is done by the ssh-agent process, with which you can register your keys by running the command ssh-add.
After I switched to Snow Leopard, my deployment script stopped working, because somehow the SSH key didn’t get forwarded to the server. I was presented with this login prompt: Enter password for git@git.gitserver.local:
Of course I didn’t have a password, because Gitosis uses key-based authentication only.
To make a long story short, Snow Leopard ships with key forwarding disabled by default and you have to modify the file /etc/ssh_config
to get it working.
Just change the line
into
and you’re good.
comments powered by Disqus