Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » How to Generate SSH keys in Windows 11

How to Generate SSH keys in Windows 11

Posted on 31/03/202327/12/2023 Matthew By Matthew No Comments on How to Generate SSH keys in Windows 11
SSH-Keys-Generation
SSH Keys Generation in Windows 11

In this article, we shall discuss “How to Generate SSH keys 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. Please see: How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid on Windows 11, and How to Scan WordPress websites With WPScan For Security Vulnerabilities.

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

Also, see 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”.

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 Windows 11.

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 rsa.pub.”

7_SSH-keys-stored-location
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.

8_Launch-Puttygen
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.

9_Generate-SSH-keys-in-Puttygen
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 in providing a bit more randomness during key creation.

10_Puttygen-Random-key-generation

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

11_Public-keys
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).

12_Private-keys
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.”

Conclusion

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.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Windows, Windows Server Tags:SSH, Windows 10, Windows 11, Windows Server 2016

Post navigation

Previous Post: Fix WordPress Error “The Link You Followed Has Expired”
Next Post: How to Fix Failed to open the Group Policy Object on this Computer

Related Posts

  • Error 0x800f0823 The specified package cannot be added to this Windows Image
    Error 0x800f0823: Wizard.hta Screen stuck during WDS Deployment Windows Server
  • 10.0.17763.1 error
    Fix Windows 10 Setup 1809 build 10.0.17763.1 is not supported Error Windows Server
  • Distributed File System DFS
    All About Distributed File System Windows
  • BitLocker removal on Windows Server
    How to correctly disable BitLocker on Windows Server Windows Server
  • what is saml e1690630549650
    What is SAML – Security Assertion Markup Language Windows Server
  • OpenSSL on Windows
    How to Install OpenSSL on Windows Computers Windows

More Related Articles

Error 0x800f0823 The specified package cannot be added to this Windows Image Error 0x800f0823: Wizard.hta Screen stuck during WDS Deployment Windows Server
10.0.17763.1 error Fix Windows 10 Setup 1809 build 10.0.17763.1 is not supported Error Windows Server
Distributed File System DFS All About Distributed File System Windows
BitLocker removal on Windows Server How to correctly disable BitLocker on Windows Server Windows Server
what is saml e1690630549650 What is SAML – Security Assertion Markup Language Windows Server
OpenSSL on Windows How to Install OpenSSL on Windows Computers Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

Veeam Vanguard

  • AzureCloudShell
    Provisioning Azure Resources using Azure Az PowerShell Cmdlet from Cloud Shell AWS/Azure/OpenShift
  • Veeam V11
    What’s new in Veeam Backup and replication v11? Backup
  • windows 11 desktop 1
    Windows 11 Hardware and Software Requirements: Upgrade to Windows 11 Windows
  • Windows 10 Upgrade 1 1
    Perform an in-place upgrade from Windows Server 2016 to Windows Server 2019 Windows Server
  • AWS Scheduled Events
    View Scheduled Events on AW using AWS Web Console and CLI AWS/Azure/OpenShift
  • tux through window 620x354 1
    WSL Error 0x8007019e: WSL Register Distribution failed with error Windows
  • banner 3
    How to Enable or Disable SuperFetch in Windows 11 Windows
  • windows 10 hert
    Windows Management Instrumentation Commands Scripts

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,808 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.