Creating a SSH KeyPair in Windows using PuTTY utilities.

An SSH key pair consists of 2 keys, a PRIVATE KEY and a PUBLIC KEY. The public key is intended to go on the machine you wish to connect to remotely (Remote Host) and the corresponding private key remains on your machine (Client). When set up correctly a VNC connection will not be established unless the Remote Host and Client have their correct keys.

The PRIVATE KEY stays on your client computer and the PUBLIC Key goes on the computer you wish to access remotely.

To generate an SSH Key Pair we can use a utility that ships with PuTTY called PuTTYGen.exe. Please note that the keys generated in this example were deleted and never used.

1. Start PuTTYGen.exe

Click Generate and wiggle the mouse around in the blank part of the program window to generate some additional randomness to your key


2. Password protect and save the PRIVATE key

Once password protected the PRIVATE KEY is of no use to anyone else. Should it be discovered, it will not be useable to access the key or remote machine(s) linked with it.


3. Save the PRIVATE key

Save it anywhere on your local machine, give it a name that will remind you what it is.


4. Copy the text from the PUBLIC key

Copy the PUBLIC KEY to the Clipboard by highlighting it and either typing Ctrl+C (Windows keyboard default copy command), or right clicking on the highlighted text and selecting the COPY option.


5. Save the PUBLIC key to a text file

Paste the copied PUBLIC KEY into a text file in NOTEPAD or any other Text editor, this is the file you are going to send to the computer you intend to control remotely. There is no need to go to great lengths to keep this file secret, you can simply email it to the other computer and pick it up on the other side.

Private and Public Keys are now created!