1
1
I'm trying to tunnel computer a to computer b (using autossh)
I want that port 8080 in a.com
will be mapped to port 8080 in b.com
from computer A:
autossh -M 0 -q -f -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 8081:localhost:22 root@b.com
in computer B:
root@b.com:~# netstat -nal | grep 8081
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN
tcp6 0 0 ::1:8081 :::* LISTEN
and from computer B
:
ssh -p 8081 root@127.0.0.1
works just fine (the tunnelling works)
the problem is 127.0.0.1:8081 I don't want it to be the local host but 0.0.0.0:8081 (like in ipv6).
Also, I would like to know how can I end the tunnel - I tried ssh ~C -KL8081
but it didn't work:
Bad local forwarding specification '8081'
(I already killed the autossh in A).
Thanks!~