Special thanks to Agan for your email sharing.
So long as the first SSH login to enter the password, then the same hosts are exempt.
profile Analysis
Man ssh_config 5
Code is as follows:
Controlpath
Specify the path To the control socket used for connection sharing as described in the Controlmaster section
above or the string None "to disable Connection Sharing. In the path, '%l ' is substituted by the
Local host name, '%h ' would be substituted by the target host name, ' %p ' The port, and '%r ' by the remote
Login username. It is recommended so any controlpath used to opportunistic connection sharing include at
Least%h,%p, and%r. This is ensures that shared connections are uniquely identified.
%r to the remote machine's logon name
%h to remote machine name
principle Analysis
Strictly speaking, it is not really a session Copy, but rather a shared socket.
When you first log in, save the socket as a file to:/tmp/ssh-%r@%h This path
And when you log on, once you find the same host, reuse this socket
So once the main process forces the exit (Ctrl +C), other SSH is forced to quit.
You can see the debug information validation process
by ssh-v parameters Note
Some students say that the form of a certificate on Linux, you can achieve a login-free, yes.
Can be done completely for static passwords, and for dynamic passwords (the way passwords are), the above methods can be much easier.