2 ms·
I use this alias in my .ssh/config to connect through a gateway machine: Host myserver User user ProxyCommand ssh -q public-server nc -q0 p
by trinovantes 5y ago
I use this alias in my .ssh/config to connect through a gateway machine:
Host myserver
User user
ProxyCommand ssh -q public-server nc -q0 private-server 22
I can't remember what these flags actually do but they seem to get the job done
- taftster 5y agoProxyJump is slightly preferred in modern SSH. Does what you're doing, but with simpler syntax. Take a look.
- trinovantes 5y agoThanks, I see that it's a fairly recent addition to OpenSSH I wrote that alias about a decade ago when it wasn't available for me yet
- taftster 5y agoYeah, it's a new parameter, based on exactly this common use case.