source: http://www.howtoforge.com/reverse-ssh-tunneling
Let's assume that Destination's IP is 192.168.20.55 (Linux box that you want to access).
You want to access from Linux client with IP 138.47.99.99.
Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99)
1. SSH from the destination to the source (with public ip) using command below:
ssh -R 19999:localhost:22 sourceuser@138.47.99.99
* port 19999 can be any unused port.2. Now you can SSH from source to destination through SSH tuneling:
ssh localhost -p 19999
Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99) <- Bob's server
3.1 From Bob's server:
ssh sourceuser@138.47.99.99
ssh localhost -p 19999
Tip: you may run a command (e.g. watch, top) on Destination to keep the connection active.
0 Comments:
Post a Comment