13 Oct 2011

Creating an SSH tunnel in Microsoft Windows using putty

We've already seen how to create an ssh tunnel using *nix command line in  a previous post, but now we'll see how to do it in microsoft windows.

Just to remember you that an SSH tunnel can be used, among many other things, to give you access to an application running on a specific port on a remote machine to which you would not have direct access as it was blocked by a firewall. You need, however, to have ssh access to that machine.

Firts we need putty, an ssh client that can be downloaded here for free:
http://www.chiark.greenend.org.uk/~sgtatham/putty/

Then start it up and type in the hostname you are connecting to as shown in the picture.
Having the hostname we change to the Tunnel configuration screen, under Connection/SSH (see figure).
 Here we enter the local port in which the destination port will be mapped and the destination IP or hostname and port and then click the 'Add' button.

In this example we would be tunneling our local port 8088 to the remote machine's port 8088.
Finnaly we just hit 'Open' and a shell will be shown asking for our credentials on the remote server.
After a successfull login the remote service will be available in the local machine as localhost:8088



No comments: