Philipp Kern: SSH control connections
Thanks to the one who posted this little hint some weeks ago The ControlMaster? feature recently provided by ssh is really helpful. (If you are on Darwin, you need to install openssh through DarwinPorts first.)
It's quite easy to enable it. Consider the following snipplet for ~/.ssh/config:
ControlMaster? autoIt creates a control channel for a server connection upon the first connect. It is persistent as long as the first SSH process is running. It will block after the logout though if there are still childs connected to the master process. If that annoys you, just open some SSH masters which pre-authenticate into the background by using ssh -M -fn. What do you gain from that? Well, consider you have a SSH connection open to some host and want to scp something. You won't have to go through any authentication again and the copy process starts immediately because it is multiplexed over the connection which already exists. The same counts if you want to start a second shell to that host with the same username. I use ssh-agent for authentication (gpg-agent probably soon to come...), but sometimes the negotiation just needs quite a long time, so this snipplet is a serious SSH improvement for me.
ControlPath? ~/.ssh/ssh_control_%h_%p_%r