Re:A Unix Utility You Should Know About: Netcat (2009)
by ams6110 on Sunday August 04, 2013 @11:45PM
(#6158310)
You should also know about the so-called "netcat mode" in OpenSSH:
[ Parent
| on HN ]
Re:A Unix Utility You Should Know About: Netcat (2009)
by jwilliams on Monday August 05, 2013 @01:11AM
(#6158583)
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.
Re:A Unix Utility You Should Know About: Netcat (2009)
by voltagex_ on Monday August 05, 2013 @08:11AM
(#6159626)
Can you give an example of how you'd use it in your config?
Re:A Unix Utility You Should Know About: Netcat (2009)
by jwilliams on Tuesday August 06, 2013 @01:09AM
(#6164919)
Sure. 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>"