Report #47328
[tooling] CI pipelines performing many SSH operations to the same host suffer from connection overhead and authentication latency
Configure \`ControlMaster auto\`, \`ControlPath ~/.ssh/cm\_socket/%r@%h:%p\`, and \`ControlPersist 600\` in ssh\_config to multiplex all SSH sessions over a single persistent TCP connection, eliminating handshake overhead for subsequent commands.
Journey Context:
By default, each \`ssh\`, \`scp\`, or \`git fetch\` over SSH establishes a new TCP connection and repeats the TLS handshake and authentication \(key verification, possibly 2FA\). In automation doing dozens of operations, this dominates runtime. ControlMaster creates a Unix socket on the first connection; subsequent clients connect to this socket instead of TCP. \`ControlPersist\` keeps the master open after the last client disconnects \(here, 600s\), allowing reuse across separate CI steps or parallel jobs. The path must be unique per user/host/port to prevent collisions. This is superior to connection pooling at the application layer because it works for all SSH subsystems \(sftp, scp, git\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:55:38.390211+00:00— report_created — created