Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • It looks the second one will not be registered in /var/log/secure or /var/log/auth.log. However, will the second one be registered in /var/log/wtmp? Commented Sep 6, 2013 at 15:21
  • @XichenLi /var/log/secure and /var/log/auth.log log SSH connections; a slave connection does not appear there because it piggybacks on an existing connection. If your ssh session allocates a terminal (i.e. ssh somehost with no command supplied, or ssh -t), that is (normally) logged in wtmp, regardless of how that terminal appeared (sshd whatever method was used to establish the connection, terminal emulator application, …). Commented Sep 6, 2013 at 15:51
  • 6
    You can also use ControlPersist 600 which is a delay in seconds of the socket being in idle before it gets automatically deleted. Otherwise it will close down automatically when the master connection ends. That's no good for executing a series of commands remotely (eg. a series of rsync commands to different folders) Commented Jun 19, 2016 at 1:05
  • 3
    If you do not want to edit the global configuration, you can also use the options -S (specify socket) and -M (create master connection) of the SSH client. Commented Oct 7, 2016 at 20:07