Somehow we’d not come across this little “hack” before, so perhaps others haven’t….
Anyway, rather than recreating a new TCP connection to a host, SSH can multiplex the traffic down an existing connection to that host.
This results in subsequent ssh connections opening quicker.
The magic stuff is –
* Edit ~/.ssh/config
* Add in something like :
Host *
ControlMaster auto
ControlPersist 1
ControlPath ~/.ssh/cm_socket/%r@%h:%p