Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

May 2, 2012

Reverse SSH Tunneling OR "Poor mans VPN"

In corporate networks , the servers will be placed behind a NAT for security reasons. Its not possible to access the server behind the NAT from outside network. And here comes a way to access servers behind NAT through SSH , its called Reverse SSH Tunneling OR Poor Mans VPN.

Scenario.

IP Address of the Server you need to access 192.168.20.55
IP Address of the Client from which you are trying 150.57.9.9


1. SSH from the destination to the source (with public ip) using command below:


ssh -R 2080:localhost:22 sourceuser@150.57.9.9

2. Now you can SSH from source to destination through SSH tuneling:

ssh localhost -p 19999