ControlMaster auto ControlPath ~/.ssh/sockets/ssh_mux_%h_%p_%r ControlPersist 60All three are extensively described in the ssh_config(5) man page, but here's a summary:
- ControlMaster auto will create a new ssh connection when no matching socket exists. Otherwise, it will just use the existing connection.
- ControlPath is simply the path to the control socket, with %h, %p and %r being replaced with target host, port and username to keep the socket name unique. Having this in a user-specific location instead of /tmp is generally a good idea.
- ControlPersist defines how long the master connection should be kept open after exit. You can specify "yes" for indefinite or a number of idle seconds. If you reconnect within that idle time, it will again re-use the existing connection. Note that if you do not have ControlPersist and you quit the master connection, you will terminate all other connections too! ControlPersist was added in OpenSSH 5.6.