To create and use SSH keys on Windows, you need to download and install both PuTTY, the utility used to connect to remote servers through SSH, and PuTTYgen, a utility used to create SSH keys.
On the PuTTY website, download the
.msi file in the Package files section at the top of the page, under MSI (‘Windows Installer’). Next, install it on your local computer by double clicking it and using the installation wizard.
After the programs are installed, start the PuTTYgen program through your Start Menu or by tapping the Windows key and typing “PuTTYgen”. The key generation program looks similar to this:
You can customize the Parameters at the bottom if you like, but the default values are appropriate in most situations. When you’re ready, click the Generate button on the right-hand side.
You might be prompted to “generate some randomness by moving the mouse over the blank area”. This randomness, known as entropy, is used to create keys in a secure fashion that won’t be reproducible by other people.
When the key is generated, you’ll see the public key displayed in a text box.
Click on both the Save public key button and the Save private key button and select a secure location to keep them. You can call your keys whatever you’d like. Your private key will have the extension
.ppk, and we recommend using an extension like
.txt for the public key so you can open it with a regular text editor later.
Now that you have your generated key pair saved on your computer and ready to use, you can: