Comment by trinovantes

3 years 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

ProxyJump is slightly preferred in modern SSH. Does what you're doing, but with simpler syntax. Take a look.

  • Thanks, 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