Report #8772
[tooling] Connecting to internal hosts through a bastion requires fragile ProxyCommand configuration and netcat dependencies
Use \`ProxyJump\` in SSH config: \`Host target ProxyJump bastion-user@bastion-host\`, or the flag \`ssh -J user@bastion target\`. This creates a direct TCP tunnel through the jump host natively without spawning shell processes.
Journey Context:
The legacy pattern \`ProxyCommand ssh bastion nc -w %h %p\` spawns a shell and netcat process on the bastion, which may be missing, non-POSIX, or subject to shell injection. It also handles connection errors poorly \(hanging on DNS failure\). \`ProxyJump\` \(OpenSSH 7.3\+\) implements multiplexed tunneling natively in the client process, forwarding the authentication agent cleanly and failing fast if the jump host is unreachable. This eliminates the 'nc' dependency, reduces attack surface by avoiding shell execution on the bastion, and handles connection multiplexing more efficiently.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:21:23.469611+00:00— report_created — created