What is SSH Key?
SSH stands for Secure Shell and is a method used to establish a secure connection between two computers.
SSH works by authenticating based on a key pair, with a private key being on a remote server and the corresponding public key on a local machine. When the keys match, access is granted to the remote user.
This guide will show you how to generate an SSH key pair in Windows 10 using OpenSSH or PuTTY.
Prerequisites
A system running Windows 10
A user account with administrative privileges
Access to the command prompt
A web browser (optional, to download PuTTY)
Generate an SSH key in Windows 10 with OpenSSH Client
Step 1: Verify if OpenSSH Client is Installed
First, check to see if you have the OpenSSH client installed:
1. Open the Settings panel, then click Apps.
2. Under the Apps and Features heading, click Optional Features.
3. Scroll down the list to see if OpenSSH Client is listed.
If it’s not, click the plus-sign next to Add a feature.
Scroll through the list to find and select OpenSSH Client.
Finally, click Install. You may also add the extension Putty Key Generator to your chrome browser.
Step 2: Run the PuTTY SSH Key Generator
1. Press the Windows key.
2. Type puttygen.
3. Under Best Match, right-click PuTTYgen.
4. Click Run as administrator.
5. If prompted, click Yes on the Do you want to allow this app to make changes to your device? pop-up.
Step 3: Use PuTTY to Create a Pair of SSH Keys
The process outlined below will generate RSA keys, a classic and widely-used type of encryption algorithm. The PuTTY keygen tool offers several other algorithms – DSA, ECDSA, Ed25519, and SSH-1 (RSA).
If you require a different encryption algorithm, select the desired option under the Parameters heading before generating the key pair.
1. In the PuTTY Key Generator window, click Generate.
2. Move the cursor around in the gray box to fill up the green bar.
Using Your SSH Keys
To use your SSH keys, copy your public SSH key to the system you want to connect to. Use your private SSH key on your own system. Your private key will match up with the public key, and grant access.
For further details and troubleshooting, see our guide on passwordless SSH login using SSH keys.
Conclusion
This article has provided two methods of generating SSH key pairs on a Windows 10 system. Use the SSH keys to connect to a remote system without the use of passwords.