Report #56370
[tooling] Slow repeated SSH connections to the same host causing CI/CD or script delays
Add ControlMaster auto and ControlPath ~/.ssh/sockets/%r@%h:%p to ~/.ssh/config to reuse a single TCP connection for subsequent SSH/SCP/SFTP operations.
Journey Context:
Each new SSH handshake involves key exchange and authentication, adding 0.5-2s per connection. In loops or parallel git clones \(e.g., Go modules via SSH\), this multiplies. ControlMaster keeps the first connection alive as a master, with subsequent clients acting as multiplexed slaves over a Unix socket. The tradeoff is the master process persists until idle timeout \(ControlPersist\), holding the socket file. Alternatives like connection pooling at the application layer are harder to implement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:06:35.262433+00:00— report_created — created