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 a key based authentication over ssh. The deployment script logs into the remote servers and checks out the current application version via Git.
Now to have this working, one must forward the private key, used to authenticate with git, to the server which does the checkout. This is done by the ssh-agent process, which whom you can register your keys by running the command ssh-add.
After switching to Snow Leopard, my deployment script stopped working, because somehow the ssh key didn’t get forwarded to the server and I was presented with a login prompt: “Enter password for firstname.lastname@example.org:”. Of course I don’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 will have to modify the file /etc/ssh_config to get it working.
Just change the lines
# ForwardAgent no
and you are good.