Speed up multiple SSH sessions

Filed under: linux 

I often use multiple SSH sessions into the same server. I also do things like port-forward remote ports to local ones (for accessing managed switches, databases, and other things that might not have a public IP address).

A trick I've used before is having ssh setup a "master" socket, so that all ssh sessions to a particular host use a shared connection. This also prevents the harmless but annoying messages about being unable to forward ports that have already been forwarded by another ssh session. However, the method I'd been using previously required that I start the first ssh session differently than subsequent ssh sessions.

Tonight I stumbed across this article in Linux Journal which gives a really great setup that gives all the benefits of my old method and makes the whole process completely transparent.



0 comments Leave a comment