Howto Setup and Use SSH in Windows (with RSA or DSA keys)
Secure Shell (SSH) is an Internet protocol that lets you establish an encrypted data stream (including encrypted login) for a number of program types that are normally unencrypted ("cleartext").
The most popular (and easiest) use for SSH is as a replacement for telnet. This document covers setting up SSH in Microsoft Windows as a telnet-replacement only; if you’re looking for help with SFTP or SSH-wrapping of other protocols, you’re on your own.
Using PuTTY:
PuTTY is a free SSH client for Windows written by Simon Tatham in England, and is going through constant development and improvement. It offers some features (like SSH2 and xterm emulation) that TTSSH doesn’t, although it’s missing a few (like keyboard customization) that TTSSH has. It comes down to personal preference, really.
Setting up PuTTY
- Download the latest version of PuTTY from their main site:
- I will download all of them, if you don’t know what others are for, just download PuTTY to keep things simple.
- PuTTY doesn’t need an install routine; just put the "putty.exe" file in a folder where it’s easy to find, and create a shortcut to it in a friendly place.
TIPS:
I prefer to launch PuTTY from the Command Prompt, you can refer this link to set up the path so that windows will know where to search for putty.
I also set up F3 as a shortcut to launch the Command Prompt, so I now I just need hit F3 and type in putty to launch it.
Now we’re ready to run PuTeTY.
A "PuTTY Configuration" window will appear, with categories on the left side. You can customize the terminal all you want, but you should be able to connect using the defaults. (Our PuTTY help page has some good tips and screenshots, if you need more than we cover here.)
In "Session", type your intended host name and select "SSH".
NOTE: PuTTY doesn’t deal well with hostnames that refer to multiple servers, so you’ll need to use panix1.panix.com (or panix2, panix3, etc.) as your host name instead of shell.panix.com.
Go to the "SSH" category, and set "Preferred SSH protocol version" to 2 (or "2 only" if you like).
Now go back to "Session", type a name for your session under "Saved Sessions", and click "Save".
If you want to customize the screen size or colors, etc., feel free. But make sure you keep at least one saved session with the program defaults, in case you make a change that stops it working.
-
- b. Username/password login
- If you’re doing a simple username/password login, then just click "Open" after completing the setup steps above. PuTTY will prompt you for your username and password, and then you’ll be logged in.
- c. Public/private-key login
- If you want to use a public/private-key authentication scheme, first you’ll need to create the keys with "puttygen". Put your saved private key in your PuTTY directory.
-
Now, load your session and go to the "SSH:Auth" category. Click the "Browse" button next to "Private key file for authentication", and tell it where your private key is. Also, in the "SSH" category itself, verify that "Preferred SSH protocol version" is set to 2.
When you’ve made these changes, go back and save your session again.
Making RSA or DSA keys with puttygen
PuTTYGen is a free program (by the people at PuTTY, of course) which generates public/private key pairs for use in authentication. You can use PuTTYGen-created keys in either PuTTY or TTSSH.
Download PuTTYGen here:
Double-click the file to run it. The program is very simple; just select "SSH1 (RSA)" if you’re using Tera Term and TTSSH, or select "SSH2 DSA" if you’re using PuTTY. Then click "Generate" to start making a new key.
The program will ask you to move your mouse around in the box to generate randomness for a while. Then it will calculate your keys.
Select and copy (ctrl-c) the public key as shown, then log into a Panix shell session and go to your home directory. Create a ".ssh" directory with the following command:
mkdir .ssh
(Don’t forget the dot!) Then "cd" to that directory and create a file (with your text editor) called "authorized_keys". Paste your new public key into this file; MAKE SURE it’s all one very long line with no line breaks.
Now return to the PuTTYGen program, and enter a passphrase (twice) in the blanks provided. This will become the password you use to log in, but you should NOT use your regular Panix password. Now click "Save", and tell it to save in the same directory as your SSH program.
NOTE: PuTTYGen will save your private key with a ".PPK" extension. This is required for easy compatibility with PuTTY, but is unnecessary if you’re using TTSSH. Harmless, but unnecessary.
Now just go back into your SSH program, tell it where to find the private key, and save your setup again. That’s all!
Other SSH Software
I also like to use
for similar purpose.

