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*

8
  • That's interesting! Is there a way to explicitly turn it on and off for a given connection? Seems like overkill to so drastically change all SSH connections for this one use case. Can it be used in a more precise manner? To start multiplexing only a certain connection? Commented Jul 26, 2017 at 23:36
  • @Centimane yeah, updated the answer Commented Jul 27, 2017 at 0:24
  • 1
    I would suggest to put the socket in user's home rather than a world read-writable /tmp/. Commented Jul 27, 2017 at 3:43
  • @heemayl Good point. I will edit it when in a computer. Commented Jul 27, 2017 at 6:23
  • @RuiFRibeiro Also looks like, according to man ssh, ControlPath, ControlMaster and ControlPersist are valid options to pass an ssh command using -o. Could be an even more precise use case, set up the multiplexing in the first ssh of the script and recycle it for the others, but otherwise avoid the performance penalty. I wonder what the benchmark of multiplexing VS not for 3 SSH connections, given that "There is also significant delay when opening a new connection" Commented Jul 27, 2017 at 10:21