Create SSH Key on Windows 10 and 11
Create SSH Key is the process of generating secure key pairs for authentication on Windows 10 and 11. Use built-in OpenSSH or PuTTY tools for password-free remote access.
🤖AI Overview:
Create SSH Key involves generating cryptographic key pairs for secure computer connections. In Windows 10 and 11, users can create SSH keys using OpenSSH Client, PuTTYgen, or Windows Subsystem for Linux. Keys include a private key kept secret and a public key installed on remote servers to enable passwordless authentication.
Tutorial Create SSH Key in Windows 10/11
Previously on the OperaVPS blog, Linux users became experts in the setup and using SSH Key on their Linux Servers. It is time to help Windows users to find out what are the 3 methods of creating SSH keys in Windows since the first step of using SSH keys is to create them. Join us with this article to review all you need to know to be able to create SSH Key in your Windows.
Prerequisites to Create SSH Key in Windows 10/11
To let this guide work correctly, make sure you have checked the below options.
- A system running Windows 10
- A user account with administrative privileges
- Command prompt accessibility
- An Internet browser (optional, to download PuTTY)
1. How to Generate an SSH key in Windows 10/11
The first method we are going to discuss is Generating an SSH key in Windows with OpenSSH Client. To do this, you need to Check if the OpenSSH Client is installed or not.
First, open Settings and click Apps.
Then, click Optional Features to go on.
At the end of the list, you can verify if OpenSSH Client is listed or not. If it has not been generated yet, click the plus-sign next to Add a feature. Finally, find and select OpenSSH Client to click Install.
At this point, to open Command Prompt, follow the below path.
Press the Windows Key>type cmd>Right click Command Prompt>Click Run as Administrator
Note: You will be asked ‘’Do you want to allow this app to make changes to your device?’’ Click Yes on this pop-up to continue.
Now, you are ready to use OpenSSH to generate an SSH Key Pair. Once the command prompt is opened, run the command below and hit Enter. You can do this with both the Command prompt and Windows Terminal.
ssh-keygen
In this way, the SHH Key would be generated automatically. To use another algorithm, you can refer to Generate a new SSH Key on GitHub.
When you are prompted to choose a name for your Key and save it in a specific location, you can use the default name or write down your own. If you are using multiple Key pairs, you are recommended to give different names to keys to be able to distinguish between keys later. However, the system will save the keys to C:\Users\your_username/.ssh/id_rsa.
Next, you will be asked to enter a passphrase. We recommend you do this and secure your key. But if you do not prefer this, just hit Enter to skip this step.
As a result, the Key pair would be generated by the system, and you can see the key fingerprint and a random art image. So, to navigate to C:\Users\your_username/.ssh, open your file browser.
Two files will be displayed. Usually, the public key is identified with the .pub extension. The identification is saved in the id_rsa file and the public key is labeled id_rsa.pub. This is your SSH key pair. To check the content of both the private and public keys, use Notepad.
2. How to Generate SSH Keys in Windows 10/11 Using PuTTY
Before OpenSSH, PuTTY was a well-known and widely used program to communicate with a server for years in Windows. Offering a method for creating SSH Keys, PuTTY provides some helper programs. PuTTY Key Generator is one of them.
To install PuTTY, open your favorite browser and open its developer page to download the installer. By clicking on the downloaded file twice, follow the installation wizard and finish it. Once the first dialog of the installation wizard is up, click Next.
Select the destination folder. If you do not need to change the default installation configuration, click Next to move on.
In this step, you should select PuTTY product features to be installed. If you do not consider any specific options, let it be continued by default. To do this, just click Install.
Click Yes on the Do you want to allow this app to make changes to your device pop-up when you are prompted. And click Finish to exit the installation Wizard when the process is complete.
After a successful installation, it is time to run the PuTTY SSH Key Generator. To do this, follow the below path.
Press the Windows Key>Type puttygen, right-click PuTTYgen under Best Match>Click Run as administrator.
Click Yes on the Do you want to allow this app to make changes to your device pop-up when you are prompted.
Then, you are ready to use PuTTY to create a pair of SSH Keys.
Several algorithms are offered by the PuTTY Keygen tool. RSA keys, a classic and widely-used type of encryption algorithm will be generated. Other ones are DSA, ECDSA, Ed25519, and SSH-1 (RSA).
Select your considered option under the Parameters heading before generating the key pair, if you wish to have a different encryption algorithm. Now, follow the two below steps:
Click Generate in the PuTTY Key Generator window.
Move the cursor around in the gray box several times to fill up the green bar.
To save the public key, follow the below path:
Click the button labeled Save public key>Choose your desired location to save the key>Give the key a name (e.g., putty_key.pub).
And finally, to save the private key, at the top of the window select Conversation>click Export OpenSSH Key.
Click Yes when you are asked if you want to save a key without a passphrase. In the end, you should choose a location to save the key and give the key a name.
How to use your SSH Keys on Windows 10/11
After a successful installation and generating SSH Keys, you can start using your SSH keys. To do this, you should copy your public SSH key to the system you want to connect to. Utilize your personal SSH key on your computer. If your private key and the public key match, access will be granted.
3. How to Generate Keys in WSL
This method is almost alike to the Command Prompt and is used by those who are WSL users. It is similar to Windows but unlike Windows, you need to specify whether you want an RSA key or something like Ed25519. While you have installed Ubuntu Linux, open up Windows Terminal.
To create an ”RSA-4096” like key, run the following command.
ssh-keygen -t rsa -b 4096
To provide Ed25519, type:
ssh-keygen -t ed25519 -C "[email protected]"
On Windows, Microsoft uses your username and the name of your PC for this automatically, but here, you are recommended to add your email address as an identifier. To generate multiple keys for different sites just tag something like “_github” at the end of the filename.
Conclusion
Learning to create SSH Key is an essential skill that empowers business owners to protect their IT infrastructure effectively. SSH keys provide a more secure authentication mechanism than traditional passwords, reducing vulnerability to cyber threats.
The process of generating, deploying, and managing these keys, when followed with recommended best practices, strengthens your business security and operational reliability.
By implementing SSH keys, you not only safeguard sensitive business data but also enhance remote work capabilities and system administration efficiency. We encourage business owners to integrate SSH key management into their broader cybersecurity strategy to support sustainable and secure digital operations.