|
Description
|
As per the synopsis.
to elaborate more on what this feature is, let's see OpenSSH's manual page says. Basically the idea is that the 1st connection goes through the authentication process as usual, and also creates a socket on the client side. The next connections use that socket, and use data channels withing the 1st connection for the transfer, thus skipping the authentication process. It greatly speeds up establishing such connections (to the same server).
man page:
ControlMaster
Enables the sharing of multiple sessions over a single network
connection. When set to ``yes'', ssh(1) will listen for connec-
tions on a control socket specified using the ControlPath argu-
ment. Additional sessions can connect to this socket using the
same ControlPath with ControlMaster set to ``no'' (the default).
These sessions will try to reuse the master instance's network
connection rather than initiating new ones, but will fall back to
connecting normally if the control socket does not exist, or is
not listening.
Setting this to ``ask'' will cause ssh to listen for control con-
nections, but require confirmation using the SSH_ASKPASS program
before they are accepted (see ssh-add(1) for details). If the
ControlPath cannot be opened, ssh will continue without connect-
ing to a master instance.
X11 and ssh-agent(1) forwarding is supported over these multi-
plexed connections, however the display and agent forwarded will
be the one belonging to the master connection i.e. it is not pos-
sible to forward multiple displays or agents.
Two additional options allow for opportunistic multiplexing: try
to use a master connection but fall back to creating a new one if
one does not already exist. These options are: ``auto'' and
``autoask''. The latter requires confirmation like the ``ask''
option.
ControlPath
Specify the path to the control socket used for connection shar-
ing as described in the ControlMaster section above or the string
``none'' to disable connection sharing. In the path, `%l' will
be substituted by the local host name, `%h' will be substituted
by the target host name, `%p' the port, and `%r' by the remote
login username. It is recommended that any ControlPath used for
opportunistic connection sharing include at least %h, %p, and %r.
This ensures that shared connections are uniquely identified.
|