2 ms·
My favorite nc trick of late is using it in combination with ssh_config(5)'s "ProxyCommand" directive. "ProxyCommand" tells ssh to use the specified command's
by mct 18y ago
My favorite nc trick of late is using it in combination with
ssh_config(5)'s "ProxyCommand" directive. "ProxyCommand" tells ssh to
use the specified command's stdin and stdout to communicate with the
destination host, rather than establishing a TCP connection itself. For example, if I can connect to the host "bastion", and if "bastion"
can connect to the host "destination", but I cannot connect directly to
"destination", I can stick the following in my ~/.ssh/ssh_config file:
host destination
ProxyCommand ssh bastion nc -w 1 destination 22
Much cleaner, and easier to manage than tunnels.