Last Updated: February 25, 2016
·
1.077K
· scott_woodall

Multiplex SSH Sessions

If you ssh into a machine (with password) and proceed to open additional ssh sessions to the same machine, you can multiplex the additional connections over the first one so you are not prompted for a password the second time.

Add the following to your ~/.ssh/config file:

Host  *
ControlPath ~/.ssh/master-%r@%h:%p
ControlMaster auto

There is a downside that if the original ssh connection dies, the ther will too.