Follow

If you don't have host bar in your .ssh/config, and do

ssh -J foo bar

it will ssh to foo, try to resolve bar there, establish a tunnel to it through foo, and ssh through that tunnel.

But you could instead expose bar on some high port on your NAT box's public IP, and in .ssh/config set sth like

Host bar
HostName natbox
Port 8022

that'd let you do

ssh bar

Now guess what happens if you do

ssh -J foo bar

with that config?

@Wolf480pl my understanding is that it connects to foo, then attempts to connect to natbox:8022 from there.
Sign in to participate in the conversation
niu.moe

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !