Report #41225
[tooling] SSH connection multiplexing leaves stale sockets or scripts can't verify if ControlMaster is alive
Use \`ssh -O check \` to verify if a ControlMaster socket is active \(exits 0 if alive, 1 if dead\). Use \`ssh -O exit \` to explicitly close the master socket and terminate multiplexing. These 'control mode' commands provide reliable IPC to manage long-lived connections without guessing socket paths.
Journey Context:
Users often set \`ControlMaster auto\` and forget, leaving stale sockets after network changes or suspends, causing 'SSH freezes' or permission errors on socket files. Scripts needing fresh connections often resort to \`rm\` on socket paths guessed from config. \`-O check\` provides a clean, documented way to query master health; \`-O exit\` gracefully terminates multiplexing and cleans up. This is essential for automation that multiplexes aggressively for speed but needs reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:40:10.212650+00:00— report_created — created