I have a SOURCE host which is remote and behind NAT. I want to connect to SOURCE via ssh from a TARGET host which is in my home network. Thus I issue the following command on SOURCE:
ssh -R 2222:localhost:22 TARGET -N
Now from TARGET I can connect to SOURCE via ssh -p 2222 localhost
. Fine
With TABLET in the same network of TARGET I would expect this to work:
ssh -p 2222 TARGET
Instead it looks like TARGET only accept connections on port 2222 from localhost. The following is on TARGET:
user@TARGET:~/$ netstat -l | grep 2222
tcp 0 0 localhost:2222 *:* LISTEN
tcp6 0 0 localhost:2222 [::]:* LISTEN
Is there a way to make the remote side of a ssh -R
accept connections from all its interfaces?