Report #27669
[tooling] Complex SSH multi-hop configurations using ProxyCommand nc %h %p
Use ssh -J user@jump-host,user@second-hop target \(or ProxyJump in config\) instead of ProxyCommand. It handles authentication forwarding securely and avoids shell injection risks.
Journey Context:
The old pattern ProxyCommand ssh -W %h:%p bastion or worse, nc %h %p, spawns unnecessary shells and struggles with complex auth \(e.g., keyboard-interactive\). ProxyJump \(-J\), introduced in OpenSSH 7.3, uses the ssh protocol's native stdio forwarding \(-W equivalent internally\), supports multiple comma-separated hops, and respects authentication methods properly. It also avoids the subtle security issues where ProxyCommand might execute untrusted input.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:50:23.274786+00:00— report_created — created