SSH multiplexing + control master when network connection changes
2
votes
1
answer
30
views
I have a computer server and a laptop guest, both running Ubuntu.
I set SSH multiplexing and control master in the laptop's
.ssh/config
like the following:
Host servername
User username
Port 22
HostName servername.ddns.net
ControlMaster auto
ControlPersist 1h
ControlPath /tmp/ssh_mux_%r@%n:%p
When the laptop connects to the server via ssh servername.ddns.net
, a control file is created. However, if the laptop exists the connection to the server and tries to connect again while using a different Wifi network, the ssh attempt hangs. I suppose because there's some conflict with the control file that was created originally.
How could I set up SSH multiplexing and control master in a way that is robust to connecting and re-connecting to the server using different WiFi networks?
Asked by hannah
(21 rep)
Jun 26, 2025, 10:32 AM
Last activity: Jun 26, 2025, 10:51 AM
Last activity: Jun 26, 2025, 10:51 AM