Are you a network administrator who is required to use a Windows operating system but are also require an SSH client to access routers, firewalls, switches, Linux, and/or UNIX. This post is targeted at network administrators needing SSHv2 (Secure Shell version 2) at the command prompt on a workstation or laptop running a Microsoft Windows operating system. There are plenty of applications on the market offering SSH and telnet in a GUI application. The problem is that many times a network administrator is at the command prompt using ping or traceroute to troubleshoot network problems. It can be distracting and even aggravating to reach for the mouse, minimize the CMD window, double click on PuTTY, select a saved session, and click open. Many network administrators, especially those who came up through the Unix or Linux ranks would much rather stay on the keyboard when they are int he heat of troubleshooting a network problem. Well here is one solution.
My solution is simple in that it provides a different way to use a popular and free Telnet/SSH client called PuTTY. The PuTTY application has many more functions than what I am using it for in this example, but I am going to focus on how to use it from the command line in Windows. This is a small example of how to make the application more useful for you when you would rather not use the mouse when needing make a Scure Shell connection from the command line of Windows. Sometimes I find myself in the middle of a help desk call at about 3AM. Someone on the other side of the planet is about to go home for the day when they realize that they still have a problem to correct. They call our help desk and they patch the call through to me if the problem is more than the level I or II engineers can handle. I drag myself out of bed and make my way to the kitchen table to fire up the laptop.
Here is my HOW TO:
- You need to download a copy of PuTTY if you don’t already have it. it.
- Rename and save a copy of the Putty.exe file to your system directory as ssh.exe. (i.e., c:\windows\system32\ssh.exe) The important thing is that you put the renamed file in a directory that is in your path statement. This step will allow for you to type ssh [IP or HOSTNAME] at a command line.
- Open a command window and type ssh and press your return key. The window shown in Figure 1 will appear.
Figure 1
- Use your mouse to select Default Settings and then click the Load button.
- Verify that you have selected the settings as shown in the above image and then click Session\Logging option on the left side of the window. The window in Figure 2 be shown.

Figure 2
- I have selected to have all of my sessions logged to a file. This file will be unique for each instance of PuTTY that I run. I do this logging automatically so that I can always go back to my logs later to verify that I did a wr mem on a Cisco router or switch after making changes when I was half asleep during a support call in the middle of the night. This is also insurance for me to prove that I did on a box if I get accused of making a change to a router, firewall, or VPN access control list (ACL) or route statements that broke something.Here is a sample filename from my C:\SSHLOG\ directory:2006-05-01-230229-192.168.1.56.log Note: The What to do if the file already exists: is really not even applicable unless multiple people are writing to a network drive since the file name includes the time in military format right down to the second. I would not worry too much about drive space for standard log files from accessing routers, switches, and firewalls. I have accumulated 161 log files in my logging directory in the past month that add up to less than 1MB. You may want to set this directory to be compressed or create a script to compress the files periodically if you tend to generate a lot of large session logs.
- Next you may want to click on the Terminal/Keyboard selection to display the following window. I chose to configure my PuTTY session to allow for use of the Backspace key to move the cursor backwards line it is used in a Windows command window. You will see in Figure 3 an example of that screen and how it needs to be configured to get that functionality.

Figure 3
- The last thing you need to do before using your command line ssh (PuTTY) tool is to save the default settings. Click on the Session option on the left side of the PuTTY Configuration window as shown in Figure 1. Now click Default Settings and then the Save button. You can now close the PuTTY Configuration window using the X button in the upper right corner of the window.
- Now you can access network devices and servers using SSHv2 by typing ssh [IP Address] at a windows command prompt. A second window will pop up as shown in Figure 4. The second window will automatically close when you exit the SSH session based on the Always selection for the Close window on exit: settings shown in Figure 1 above.

Figure 4 Don’t forget that you can always use your
hosts file found in
C:\WINDOWS\system32\drivers\etc\ for hostnames instead of typing out the IP address as shown in the above example. This is assuming you are running from a mobile environment and connecting to servers that do not have registered hostnames. The instructions and screen captures for this article were taken from PuTTY version 0.56. Please refer to the
PuTTY License Page for more information on the use of the PuTTY application.You can make another copy of the executable to server a different protocol like telnet. For instance you can save a separate copy of the putty.exe as telnet32.exe in your C:\windows directory or any directory shown in your path statement when you type “set” at the command line.