2 ms·
I only discovered this recently - I was using a literal "nc %h %p" rather than this shortcut. Also worth noting this is also extremely useful when used in your
by jwilliams 13y ago
I only discovered this recently - I was using a literal "nc %h %p" rather than this shortcut.
Also worth noting this is also extremely useful when used in your ~/.ssh/config file.
- voltagex_ 13y agoCan you give an example of how you'd use it in your config?
- jwilliams 13y agoSure. I have something like: Host <bastion> Hostname <bastion> User gateway ForwardAgent yes Host 10.0.* User <username> ProxyCommand ssh -W %h:%p <bastion> Where bastion is the NAT/Bastion SSH host for my infrastructure. 10.0.* are internal IP addresses, which don't work on my network, but get passed through to the bastion (where they do work). Pretty handy as I can just "ssh <internal address>"
- voltagex_ 13y agoThanks!