The ssh ControlMaster setting “allows you to re-use an existing SSH connection whenever you connect to a host you are already connected to.”
In your
~/.ssh/configfile, add:Host * ControlMaster auto ControlPath /tmp/%r@%h:%pWhenever you connect to
server.example.comas userjoeuser, SSH will create a named pipe at/tmp/joeuser@server.example.com:22. If you open another connection to the same server (as the same user), instead of creating a new TCP/IP connection, SSH will automatically multiplex the new session with the existing connection (through the named pipe)! This reduces time spent setting up new connections.