Report #69756
[tooling] Multiple SSH connections to the same host are slow and authenticate repeatedly
Enable ControlMaster and ControlPath in ssh\_config to multiplex connections over a single TCP connection. Example config: Host \* ControlMaster auto ControlPath ~/.ssh/controlmasters/%r@%h:%p ControlPersist 10m
Journey Context:
Scripts and AI agents often run multiple ssh commands sequentially \(scp, remote exec, file checks\), each incurring TCP handshake and authentication overhead. OpenSSH's connection sharing \(ControlMaster\) keeps the first connection alive as a UNIX socket, reusing it for subsequent connections. This reduces latency from seconds to milliseconds and avoids repeated MFA prompts. ControlPersist keeps the master open in the background for a specified time after the last connection closes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:34:07.755467+00:00— report_created — created