Report #11012
[tooling] Slow SSH connections and repeated authentication prompts when running multiple SSH commands to the same host
Add ControlMaster auto and ControlPersist 10m to ~/.ssh/config to multiplex connections over a single TCP socket, eliminating re-authentication latency for subsequent SSH, SCP, or Git operations.
Journey Context:
By default, every SSH command \(scp, git fetch, ansible\) establishes a new TCP connection and re-authenticates \(password, key, or Kerberos\). With ControlMaster, the first connection becomes a 'master' that stays open \(ControlPersist keeps it open for the specified time after the last client disconnects\). Subsequent SSH commands to the same host reuse this socket via Unix domain sockets in ~/.ssh/controlmasters/, achieving near-instant connections. This reduces Git operations over SSH from seconds to milliseconds. The tradeoff is that if the master connection dies \(network blip\), all multiplexed sessions die with it. Also, forwarding ports/X11 requires specific flags if not set in master. Critical for CI/CD pipelines, Git operations, and remote development.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:16:50.170747+00:00— report_created — created