Generating your SSH key-pair
Windows has no native console, so we use a pair of programs called Putty, and Puttygen to generate the ssh keys and connect to the server using the keys and SSH.
- Download Putty and Puttygen here.
They are standalone applications and no installation is required.
- Launch Puttygen
- Select SSH2 for type, and remove any value in the bit length field.
- Click Generate and follow the instructions. The key information is displayed in the upper section of the dialog box.
- Select all the text in the "Public key for pasting into authorized_keys file" section and copy by pressing Ctrl-C. Paste this public key into an email and send that email to support@advomatic.com You may also want to save it to a text file on your computer where you can retrieve it later as it is your public key, and may be shared freely.
- Type a passphrase in the Key passphrase and Confirm passphrase edit boxes.
- Click Save private key. Save the PuTTY private key file into a directory private to your Windows login (in the Documents and Settings/(userid)/My Documents subtree in Windows 2000/XP) where you will be able to remember and find it later.
Connecting to the server with your SSH key and Putty
- Invoke putty.exe
- Click "Session" in the sidebar.
- Enter ip address or hostname of your server (e.g., 192.168.1.2)
- Click "SSH" in the Protocol option
- Choose "SSH" under "Connection" in the sidebar
- In "Preferred SSH protocol version", select "2 only"
- Click "Auth" under "SSH"
- Click the Browse button, select the private key file you saved in Step 7, likely named "id_rsa.ppk".
- Click "Session" again, like in step 9
- Enter a name (e.g. "toylet.session") in the textbox directly under "Saved Sessions".
- Hit the "Save" button. The name "toylet.session" would appear in the listbox of "Saved Sessions".
- Double-click "toylet.session". Now you would be presented with a login screen for OpenSSH.
- Enter the linux user name for the server, generally the shortname we have given the client
- Enter the passphrase for your private key that you specified in step 6. You should get:
Login as: (username provided)
Authenticating with public key "imported-openssh-key"
Passphrase for key "imported-openssh-key":
Last login: Wed May 31 12:35:00 2006 from 192.168.1.10
username@server:~$
- You have successfully logged into your Linux server via OpenSSH.
- Type "exit" and hit enter to logout. You now at least know the keys are working, so connection problems with other clients is likely a configuration or setting on the client as opposed to a problem with the key.
images used from http://www.linux-sxs.org/networking/openssh.putty.html