Beginner Guide to SSH Tunneling (Dynamic Tunneling)

Basically tunneling is process which allows data sharing or communication between two different networks privately. Tunneling is normally perform through encapsulating the private network data and protocol information inside the public network broadcast units so that the private network protocol information visible to the public network as data. 

SSH Tunnel:  Tunneling is the concept to encapsulate the network protocol to another protocol here we put into SSH, so all network communication are encrypted. Because tunneling involves repackaging the traffic data into a different form, perhaps with encryption as standard, a third use is to hide the nature of the traffic that is run through the tunnels.

Types of SSH Tunneling:

  1. Dynamic SSH tunneling
  2. Local SSH tunneling
  3. Remote ssh tunneling

Let’s Begin!!

Objective:  To establish SSH connection between remote PC and local system of different network.

Here I have set my own lab which consist three systems in following network:

SSH server (two Ethernet interface) 

IP connected to remote system

IP connected to local network system

SSH client (local network) holds IP

Remote system (outside network) holds IP

In following image we are trying to explain SSH tunneling process where a remote PC of IP is trying to connect to which is on INTRANET of another network. To establish connection with SSH client, remote PC will create SSH tunnel which will connect with the local system via SSH server.

NOTE: Service SSH must be activated on server as well as client machine.

Given image below is describing the network configuration for SSH server where it is showing two IP and another as explain above.

Another image given below is describing network configuration for SSH client which is showing IP

Remote Pc ( is trying to connect to SSH server ( via port 22 and get successful login inside server.

Similarly now Remote PC ( trying to connect with Client PC ( via port 22, since they belongs to different network therefore he receive network error.

Step for SSH Dynamic tunneling

  • Use putty to connect SSH server ( via port 22 and choose option SSH >Tunnel given in the left column of category.
  • Give new port forwarded as 7000 and connection type as Dynamic and click on ADD at last.
  • Click on open when all things are set.

This will establish connection between remote pc and SSH server.

Now login into putty again give IP of client system as Host Name and Port 22 for SSH then click on open.

Open previous running window of putty choose Proxy option from category and follow given below step:

  • Select proxy type as SOCKS 5
  • Give proxy hostname as and port 7000
  • Click on open to establish connection.

Awesome!! We have successfully access SSH client via port 7000 

Author: AArti Singh is a Researcher and Technical Writer at Hacking Articles an Information Security Consultant Social Media Lover and Gadgets. Contact here

Related Posts Plugin for WordPress, Blogger...

Leave a Reply