OpenSSH Multiplexed

Meethune showed me a really cool new feature inOpenSSH 4.2 called multiplexing. In short, it allows you to connect once to a remote host, then simply uses a socket to reuse that connection for new login shells. To use add:
Host *
ControlPath ~/.ssh/ctl-%r-%h-%p
ControlMaster auto

to the beginning of your ~/.ssh/config and enjoy!

To check the status of the connections run:
ssh -O check remotehost
and to kill the master connection run:
ssh -O exit remotehost

Now this won’t allow for adding forwarded ports to the multiplexed connection, but that feature is in the works.

More info…

Leave a Reply