How to generate an SSH key pair in Windows?

The easiest way to generate SSH keys in Windows 10 or Windows 11, is by using PuTTY. The famous SSH client.

When you install PuTTY, you also install the PuTTYgen utility. This utility is what we’re going to use to generate your SSH key.

So here’s how to proceed after installing PuTTY

1. Open PuTTYgen (press the windows key and type puttygen)

2. Make sure RSA is selected in the type of key to generate. (do not select SSH-1(RSA)!)

3. I usually set the number of bits to 4096. 2048 is not bad either.

4. Click generate and then move your mouse over the program.

5. Type a passphrase and then confirm it.

6. You can now save the private key

7. And the OpenSSH authorized_keys file is in text. You can save it into a text file for future usage. Example: This is what you’ll enter in Hetzner dashboard when you create a new Cloud Server.

And that’s it!

You have just generated your keys in Windows. The Linux version is here.