Tuesday, July 28, 2009

Reverse SSH Tunneling

Easy howto reverse ssh instructions for those who wish to access a box lying behind a NAT router.

To start lets assume that the system you wish to access is at 192.168.0.50 and your systems IP address is 140.222.111.111

The following command would be issued from the 192.168.0.50 system, to ssh login into the 140.222.111.111 system.

ssh -R 19999:localhost:22 user@140.222.111.111

where the number 19999 refers to a port, and can be any unused port number.

After this ssh connection is made between these two systems, you can reverse ssh.

ssh localhost -p 19999

No comments: