Nowadays, security is more important than ever. It’s extremely important that user accounts, passwords and hosts are protected from malicious attacks.
Secure Shell Protocol (SSH) is capable of establishing secure encrypted tunnels for carrying data. SSH protocol can be used for remote access to your network devices, for securely transferring files between hosts and even for forwarding application data between workstations.
Various terminal emulators exist that support SSH. Based on my personal experience, SecureCRT and PuTTY are two of the best SSH emulators.
Today I am focusing on how to use PuTTY for establishing SSH remote connections and encrypted data tunnels. If you want, you can download PuTTY for free from www.putty.org.
In this article you can get the necessary steps for configuring and taking advantage of SSH on PuTTY. I also included lots of screenshots to help you along, so let’s get started with configuring PuTTY.
After downloading PuTTY, you should set up and store your preferred connections. The steps you need to do this are very easy and straightforward:
You can save as many SSH sessions as you want. The following screen shot presents the necessary configuration:

You always have the option of logging your SSH session. This is often useful when you need to take evidence of your session activity. To do so you need to perform the following:
Here is what you’ll see on your screen when you do this:

Now, to the interesting stuff …
Once you have set up your secure SSH connection towards your SSH enabled server, you need to configure traffic flows that need to be tunneled over this secure connection.
All your packets will be encrypted and untraceable to network sniffers. In order to use SSH Tunneling, also known as SSH port forwarding, you need to perform the following:

You can add as many forwarded connections as you like. When you finish configuring all your remote connections keep in mind:
Now you are ready to open your SSH session and use your SSH tunnel!
Coming back to my SSH port forwarding example, we are now able to securely connect to the 192.168.10.10 intranet server via our SSH session with the SSH server on 10.10.10.10.
This secured path is chosen when the client machine (local host) initiates a connection using TCP port 3000 as source port, as shown in the following picture. The beauty of all this is that the whole connection is encrypted.

We’ll now take a look at how we can configure PuTTY to use a secure proxy for sending all HTTP traffic through the SSH tunnel. This way our host identity is not revealed in the Internet.
For achieving this behavior I will use Firefox’s proxy characteristic. But let’s start from the beginning:

a. Source Port: Specify the source port for forwarding HTTP traffic. I have chosen port 3300 in this example.
b. Destination: Do not specify a remote IP address. Just select Dynamic and Auto.
c. Press the add button: Your configuration will look like the following screenshot:
a. Select Manual Proxy Configuration
b. For SOCKS Host enter 127.0.0.1 or localhost inside the textbox and choose SOCKS v5
c. For the port number specify the same port number you have already configured in your SSH tunnel for the source port, i.e. port 3300.
d. Accept other default settings and press OK
Eventually when you finish your Firefox’s configuration you will end up with a windows similar to this:

Keep in mind that your DNS traffic will not be tunneled through the SSH connection. To force DNS traffic to go through the proxy you should do the following:
Your settings will look similar with the following:

SSH tunneling is a secure method of encrypting your sessions, especially when you interface untrusted networks. You can secure either individual application traffic or even specific protocol’s traffic.
PuTTY is a free SSH emulator program that can help you secure both your client’s identity and traffic in a functional and persistent way.
We offer Cisco training for all levels — beginner to advanced!
Whether you’re going for your CCENT or your CCNP — we got you covered!
And unlike other training materials out there, we include everything you need to pass your exams — complete coverage of exam objectives, real world examples, and plenty of practice exam questions.
Mohamad Says:
May 9th, 2008 at 12:26 pm
Thanks for these nice articles.
They are really fantastic security handling articles.
Consecuently you have the best Training articles in the field of security
with cisco , windows , Web , .. etc .
Thanks again for your team also.