Report #26936
[tooling] How to SSH through a bastion/jump host without manually configuring ProxyCommand or netcat
Use \`ssh -J user@bastion:2222 user@target\` or configure in \`~/.ssh/config\`: \`\`\` Host target HostName 10.0.0.5 ProxyJump bastion \`\`\` Modern OpenSSH \(7.3\+\) handles the connection tunneling internally; no need for \`ProxyCommand ssh -W %h:%p bastion\` or \`nc\` workarounds. Use \`-J\` multiple times for multiple hops: \`-J hop1,hop2\`.
Journey Context:
Old tutorials recommend \`ProxyCommand ssh -W %h:%p bastion\` which works but requires understanding \`%h\`/\`%p\` substitutions and often fails with complex auth \(agent forwarding issues\). Others used \`nc\` which isn't always installed. \`-J\` \(ProxyJump\) was added in OpenSSH 7.3 \(2016\) but adoption is slow. It automatically handles stdin/stdout forwarding between the bastion and target without spawning a separate \`ssh\` process for the tunnel \(it's internal to the client\). This preserves agent forwarding correctly and handles X11 forwarding better. Tradeoff: requires OpenSSH 7.3\+ on the client \(server just needs standard SSH\). For multiple hops, comma-separate in \`-J\` or chain in config.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:36:32.566062+00:00— report_created — created