How to Generate SSH Keys in Windows 11

Security featured

Do you want to access a remote server without using a password? You’ll need to generate an SSH key pair. Here’s how to do it on Windows 11.

You’ll need SSH keys if you need to access remote servers or use Git services like GitHub. SSH keys are more secure and convenient than passwords, letting you authenticate yourself without typing anything.

Do you know how to generate SSH keys in Windows 11? In this article, we’ll show you two easy ways to create SSH keys on a Windows 11 PC using built-in tools or third-party software.

How to Generate SSH Keys Using the Command Prompt or Windows Terminal

Windows 11 comes with a built-in OpenSSH client that you can use to generate SSH keys from the command line. You can use the Command Prompt or the newer Windows Terminal app.

To generate SSH keys on Windows 11 using Windows Terminal or the Command Prompt:

  1. Open the Start menu, type cmd or terminal, and launch your preferred program.
    Open the Windows 11 terminal app
  2. Type: ssh-keygen and press Enter. This will create a 2048-bit RSA key by default.
  3. You’ll be asked to enter a file name and a location for your key. You can use the default values or change them as you like. The default location is C:\Users\username\.ssh, where username is the correct folder for your user account. If you want to use the default location, press Enter.
  4. You’ll also be asked to enter a passphrase for your key. This is optional but recommended for extra security. If you don’t want a passphrase, press Enter twice.
  5. Your key pair will be generated and saved in the specified location. You’ll see two files: one with the extension .pub (the public key) and one without (the private key). The public key is the one you’ll upload to servers or Git services, while the private key is the one you’ll keep on your computer.
    Generate SSH keys on Windows 11
  6. You can choose a different algorithm if you want, such as Ed25519, which GitHub recommends. To do that, type: ssh-keygen -t ed25519 instead.
    Generate SSH keys on Windows 11

How to Generate SSH Keys With PuTTY

PuTTY is a popular third-party software that lets you connect to remote servers using SSH or Telnet protocols. It also has a tool called PuTTYgen that lets you generate SSH keys on Windows 11.

To generate SSH keys on Windows 11 using PuTTY:

  1. Download PuTTY from its official website and install it on your computer.
  2. To open PuTTYgen, open the Start menu, type: puttygen, and select it to launch.
    Launch puttygen on Windows 11
  3. Choose the type of key you want to generate from the Parameters section. You can choose RSA, DSA, ECDSA, or EdDSA. The default value is RSA with 2048 bits.
  4. Click Generate and move your mouse randomly over the blank area to create some randomness for your key.
    Generating an SSH key in Puttygen
  5. You’ll see your public key in the Key section. You can copy it to your clipboard or save it as a file by clicking Save public key.
  6. You can also enter a passphrase for your key in the Key passphrase and Confirm passphrase fields. This is optional but recommended for extra security.
  7. Click Save private key to save your private key as a file on your computer.
    Saving an SSH key in Puttygen

Better Windows 11 Security

Generating SSH keys in Windows 11 is easy and convenient using the steps above. You can use the built-in OpenSSH client, the Windows Subsystem for Linux, or third-party software like PuTTY.  Once you have your key pair, you can upload your public key to servers or Git services and keep your private key on your computer.

This way, you can authenticate without typing passwords and enjoy a more secure and hassle-free connection. You can then use your SSH keys to sign in to remote servers or use tools like SCP to transfer files between your devices. However, if you’re looking for remote access tools, you may prefer to use RDP on Windows instead.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *


To Top