Report #50353
[tooling] SSHing through multiple hops \(bastion hosts\) requires multiple terminal windows or complex ProxyCommand scripts
Use ssh -J user@bastion:2222,user@target -o ControlMaster=auto -o ControlPath=~/.ssh/sockets/%r@%h:%p. The -J flag chains jumps natively, while ControlMaster reuses the connection socket for subsequent commands, eliminating re-authentication delays.
Journey Context:
Legacy approaches used ProxyCommand with netcat \(nc\) or manually SSHing into the bastion then ssh-ing again. ProxyJump \(-J\) is native since OpenSSH 7.3 and handles authentication forwarding correctly. However, without ControlMaster, every new SSH command \(scp, git fetch, rsync\) re-authenticates through all hops, causing multi-second delays. The ControlPath creates a Unix socket that multiplexes subsequent connections over the first authenticated tunnel. Combined, this provides near-instant multi-hop SSH access suitable for scripts and interactive use. This replaces complex VPN setups for many workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:59:51.180925+00:00— report_created — created