5
08
2008
Making SSH connections to your frequent remote hosts faster with ControlMaster
I recently learned of a newish OpenSSH feature, a feature that let’s you reuse existing SSH connections.
If you want to enable this functionality on a per-host basis, then you can setup your ~/.ssh/config file like this:
Host *
ControlMaster no
ControlPath ~/.ssh/master-%l-%h-%p-%r.sock
Host someserver
Compression yes
ControlMaster yes
To enable it:
ssh -f -N someserver
After that, just ssh in like you would normally:
ssh someserver
Combining this with SSH keys and keychain — that’s some fast SSHing. Enjoy!
Source for this article: http://www.revsys.com/writings/quicktips/ssh-faster-connections.html





6 Comments
I had no idea this was possible, too bad it’s only if you’re using the UNIX SSH command, would be awesome to have something like this on windows.
Might be possible to use the ssh client that comes with Cygwin to do this, Mike. Not sure though.
I use win when at work and putty for ssh’ing into the remote servers, do you know how these settings can be put into putty?
Unfortunately, this feature is only available in OpenSSH. PuTTY doesn’t have this feature.
Interesting, and cool! Thanks Phil =)
Look forward to more SSH tips.
Interesting, and cool! Thanks Phil =)
Look forward to more SSH tips & tricks.