Not logged in - Log In / Register

To use ssh multiplexing for host

Add the following section to ~/.ssh/config:

    ControlPath ~/.ssh/

The ssh client will now use the socket at the specified ControlPath to create new connections to A connection will fail if it is attempted and no master connection provides this socket.

Before attempting a connection, use the following script:

if test ! -e ~/.ssh/ ; then
  ssh -fMN

If the control socket does not exist, this will spawn a master (-M) that executes no command (-N) and goes to the background (-f). If the master is killed with anything nicer than SIGKILL, it will remove the socket. If the master is killed brutally, it is necessary to remove the socket manually.

SshConnectionMultiplexing (last edited 2009-07-29 16:11:00 by gary)