Windows Windows Server

How to Generate SSH keys in Windows 11

SSH Keys Generation in Windows 11

For encrypted connections between a client and a server, an SSH key, or Secure Shell key, is used as authentication. It’s commonly used for gaining remote access to servers and other network devices because of the safety it offers in authenticating and establishing a secure link between two machines. In this article, you will learn how to Generate SSH keys in Windows 11. Kindly refer to these related guides: How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid on Windows 11, how To Scan WordPress websites With WPScan For Security Vulnerabilities, how to Fix Failed to open the Group Policy Object on this Computer, and how To Fix WordPress error “The Link You Followed Has Expired”.

To use SSH key authentication, a combination of keys—a public and a private one—must be generated. The client computer stores the private key while the public key is sent to the server or other device you’re trying to connect to. The server will ask for the client’s public key when the client initiates a connection. The server then compares the key to a roster of approved keys, and grants entry to the client if there is a match. This method is a safe and effective means to verify distant links.

The use of SSH keys for authentication has many benefits over the use of passwords. They are more secure and difficult to break than other passcode systems. Furthermore, since the client can identify without human input, SSH keys offer a safe method for automating distant duties. Please, see how to add and modify the Windows Registry from the Command Prompt.

Methods on how to Generate SSH keys in Windows 11

 The SSH key can be generated on Windows 11 in various ways, which I have outlined below.

Option 1: Generate SSH Keys in Windows 11 using OpenSSH Client

Step 1: Confirm that the OpenSSH Client is installed.

It is necessary to first determine if the OpenSSH client is installed on the system. To do so, follow the steps below:

Press the Windows key + I to open the system settings, and choose “Apps.” Click on “Optional features” from the “Apps” configuration panel.

Generate SSH keys: Apps-Settings
Open the Apps setting

Under the “Installed features” search menu, type “OpenSSH.” The OpenSSH client and server tools are already installed on the system, as can be seen.

Generate SSH keys: Installed-Features
Search for OpenSSH in the installed features

The OpenSSH client utility comes pre-installed on Windows 11. In any event, if OpenSSH is not already installed, you must install it first. To do so, go to the “Apps” settings and choose the “Add Optional Feature” option.

Generate SSH keys: 3_Add-an-optional-feature
Add an optional feature

Next, in the search box, type “OpenSSH” if the OpenSSH client and server are not installed, they will show in the search results. Since the OpenSSH client and server utilities are already installed on the system, the search result is empty.

Generate SSH keys: 4_Search-for-OpenSSH
Search for OpenSSH
Step 2: Launch the Command Prompt.

To launch the Windows Command Prompt, click the “Search” button in the Windows 11 Desktop Taskbar. In the search field, type “command prompt” and choose Command Prompt as Administrator from the display results.

Generate SSH keys: 5_Command-Prompt
Open the command prompt

Step 3: Create SSH Keys in Windows 11

To generate an SSH key, use the “ssh-keygen” command. You must give the following information:

  • Enter the location where you want to store your SSH key or press Enter to continue with the default location.
  • Add a passphrase or password, input it, then retype it for confirmation.

It is not required to input a passcode; just hit the Enter key to proceed.

Generate SSH keys: 6_Generate-SSH-keys
Generate SSH keys

As you can see, we successfully generated SSH keys on Windows11.

Step 4: Confirm Key Creation

SSH keys are often saved in the “C:\Users\<username>\.ssh” directory. Go to the place where you stored the ssh key. There are two files there: “id rsa” and “id”

Location of the generated SSH keys

You can see that the SSH key was successfully produced in the “C:\Users\<username>\.ssh” directory.

Option 2: Use PuTTY to generate keys.

PuTTY is open-source and free software. It is available from the PuTTY latest release website.

After installing PuTTY, hit the Windows key or open the Windows and enter “puttygen” to launch the “PuTTYgen” software.

Open the Puttygen program

When it’s open, you’ll notice the different sorts of keys to produce at the bottom of the window. If you’re unsure, choose “RSA” and then enter “4096” in the text box labeled “Number of bits in a generated key.” Another option is to pick “EdDSA,” then select “Ed25519 (255 bits)” from the drop-down menu that appears below it.

Putty Key Generator

All you have to do now is click “Generate,” and PuTTY will begin to work. Depending on the power of your machine, this shouldn’t take long, and PuTTy will ask you to move your mouse about within the window to assist provide a bit more randomness during key creation.


After that, click “Save Public Key” to store your public key. Save it anywhere you like with the name “id” or “id,” depending on whether you chose RSA or Ed25519 in the previous step.

Generated Public keys

The private key must now be stored. Choose “Export OpenSSH Key” from the “conversions” option at the top. In most cases, you want to store this without a password, so choose “Yes” in the following dialog box. Select a place to store the key and give it a name (for example, putty key).

Generated Private keys

Your keys have been produced, and you may now exit the PuTTY key generator. To utilize your new key with PuTTY, go to the PuTTY setup and open “Connection” and “Auth.” Choose the private key you just stored under “Private Key file for authentication.”


Even though SSH keys are more secure and convenient than passwords, it is important to keep track of and safeguard them. It is important to safely keep keys and only allow authorized sites and devices to access them. In addition, keys should be changed frequently and revoked when they are no longer required.

I hope you found this blog post helpful on how to Generate SSH keys in Windows 11. If you have any questions, please let me know in the comment session.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x