I love ssh -A, which allows me to use my local ssh key when establishing a connection from a remote server. For example, I ssh -A host1.example.com and then from there I can ssh host2.example.com (or use git) and it uses my ssh key from the original machine, which in this case should be my mac. Although this has always worked for me on Debian/Ubuntu, it doesn't work on my new mac (Lion).

What am I missing here? How do I configure ssh to work correctly with -A? Do I need an ssh that is not the standard MacOS one?

The concept behind ssh -A are ssh agents. They run in the background and through the use of environment variables the agent can be located and automatically used for authentication when logging in to other machines using ssh. Have a look at the manpage of ssh-agent for more details.

Hm, just tried this out; the agent does then start, but you still have to ssh-add to get anything to work. So ssh-add alone is still the answer, as far as I understand. I guess I should add it to my .bash_profile.
–
rfayJan 19 '13 at 14:53