I was trying to set up SSH Multiplexing on our CI server to speed things up a bit, but for some reason it always failed to use the shared connection.
It turns out that our CI server (CodeShip) has
overlayfs as its filesystem, which does not play well with unix sockets.
It's a very simple fix, use shared memory to store the socket.
~/.ssh/config file (or the
-S command line flag), change the location of the socket to
Host * ControlMaster auto ControlPath /dev/shm/control:%h:%p:%r ControlPersist 10
Took a very long time to discover the problem and find a solution, so I hope this helps someone!