SSH Keys are a special tool for client identification on a Linux server. People use SSH keys to authorize server connection using SSH protocol. There are several ways to generate SSH keys inside Windows 10. You can use several tools but the most popular and the most convenient is PuTTYGen. In this article you will learn how to generate SSH key in Windows 10 using PuTTYGen.
Generate SSH Key with PuTTYGen
If you use Windows 10, you can create both public and private SSH keys using PuTTYgen, which is part of PuTTY set. You can download PuTTY from the official website.
- Open search using Win + S buttons and enter PuTTYgen. Run the program.
- First thing you need to do is select the SSH key parameters. Select the key type first. There are SSH-1, SSH-2 RSA, SSH-2 DSA, SSH-2 ESDSCA, and SSH-2 Ed25519 key. You can select SSH key type in the menu Key at the top of the window.
- Next, select the number of bits in a generated key. You can leave the default parameter which is 2048 bits.
- Click Generate. PuTTY will start generating SSH key on Windows 10. This process takes a few seconds and during it you need to hover your mouse cursor over the blank area in the Key section. This action is required to generate random symbols for your SSH keys.
- When keys are generated, PuTTYgen shows public authorization key and key fingerprint. At the same time, it saves the private key into the app’s memory. To save SSH keys in Windows 10, click the Save public key and Save private key. Do note that before a private key you need to specify a key passphrase. This can be completely random word or symbols. If you do not specify a key passphrase, PuTTYGen will ask whether you want to save private SSH keys without a passphrase.
When PuTTYgen has finished generating SSH keys, save them to preferred folder and copy to the server into the file authorized_keys using WinSCP or any other app for remote data transfer to Linux servers. You can also copy the open key file to the ssh folder on your server.
Now, before launching PuTTY, specify the path to the private key file. Go to Connection – SSH – Auth and click the Browse button.
After it’s done, you can disable password authentication on the server and use newly generated SSH keys.