Using PuTTY to tunnel to multiple machines on your remote network

PuTTY is a handy little program to login via SSH. It can be downloaded here: PuTTY.

Do not underestimate the functionality of PuTTY, it is lean and mea. It is possible to access other ports on a remote server, via tunnels, through SSH port 22.
It is even possible to access other machines on the remote network. For an example configuration, see below under "PuTTY Configuration"

Topology Example (fictitious)

In this sample configuration, the following topology is applied, with fictitious values:

myrouter.xs4all.com -> remote host is the name of my ADSL router
My router has a port forward from the server 22 to 192.168.1.240 port 22
192.168.1.230 -> where the OpenSSH service runs.
192.168.1.231 -> is a different server on the network, where no router port forward pointing to.

PuTTY Configuration

Connection -> SSH -> Tunnels:

  • Port forwarding: check "Local ports accept connections from other hosts" and "Remote ports do the same (SSH-2 only)"
  • Add new forwarded port:
    Source port: 8333, Destination port: 192.168.1.230:8333, Local, Auto
    Source port: 902, Destination port: 192.168.1.230:902, Local, Auto
    Source port: 22 Destination port: 192.168.1.231:22, Local, Auto

Session:

Host Name (or IP address): myrouter.xs4all.com and Port: 22

Set in "Saved Sessions" a logical name and press save.With open you can now set up tunnels to reach your current local host.

For example port 8333 for VMware Server is the https management console, you can open it with:
localhost:8333

Make sure that you use local ports, which are not in use on your local machine.

One thought on “Using PuTTY to tunnel to multiple machines on your remote network”

Comments are closed.