If you’ve ever used SSH for a secure connection to your server or another computer, you probably have an idea of what SSH keys are. Basically, an SSH key is a way to authenticate who you are and establish a safe, secure connection with another system. But SSH keys must be generated. So how do you generate SSH keys in Windows 10? This question is actually more common than you think since a lot of people prefer getting a Linux VPS and working with that instead of double-booting their PC or migrating from Windows. In this article, I’ll show you how you can generate an SSH Key in Windows 10. We’ll be using the popular Windows SSH client PuTTY to do the work. Now, before diving into the technical stuff, let’s look at a few definitions, just so we’re on the same page. This will help you follow the instructions better.
Generate SSH Key in Windows 10 by PuTTY
Let’s talk about SSH first. What is SSH? And what does SSH have to do with keys and making keys? The Secure Socket Shell or Socket Shell (SSH) is a popular protocol for creating safe and encrypted connections. SSH keys are standard components of the SSH protocol used to authenticate both sides and establish secure shell sessions. They’re used in connections between all types of operating systems and platforms. So, whether you’re trying to connect to a Linux VPS or a dedicated server running the latest Windows Server edition, you need to generate and use SSH keys. Before explaining SSH keys in detail, and discussing how to generate SSH keys in Windows 10, let’s speak about the SSH protocol.
“Also read: Use SSH to Connect to a Remote Server ”
What is the SSH Protocol?
SSH is a well-known protocol, especially between IT gurus and system administrators. It gives users a more secure way of accessing other systems over an unsecured network. It provides a public-key and strong password authentication. Using this protocol, you can remotely manage applications and systems, move files from one system to another, and execute commands. SSH protocol listens on the TCP port 22 by default.
What are SSH Keys?
SSH protocol, SSH keys are access credentials used to authenticate both hosts and users. Another use case is machine-to-machine or single-to-single access. SSH keys enable automation to enable the cost-effective and possible authentication required in computer-dependent and modern cloud services.
They come in various sizes, but the most common choice is an RSA 2048-bit encryption. Functionally, SSH keys gather passwords, grant access, and control the access level. There are some ways to enable or generate SSH in Windows 10. In the following, we will explain how to generate SSH key Windows using PuTTY. But before starting, let us have some checks to see whether SSH Key exists in Windows or not.
Get yourself an efficient Windows 10 VPS for remote desktop, at the cheapest price out there. FREE Windows 10 running on NVMe SSD storage and high-speed internet.Check Out Windows 10 VPS Plans
Checking For Existing SSH Keys in Windows 10
Before generating an SSH key, you’d better check for existing SSH keys. To do so, do the following steps:
- Open Windows Command-Line by typing cmd on the search box of the Windows taskbar.
- In the command prompt environment, type ssh-keygen
- If you don’t have any SSH-keygen, you will see this message:
‘ssh-keygen’ is not recognized as an internal or external command, operable program, or batch file
- The default directory for your SSH keys should be something like this:
Note: if you installed git with bash, you should open git Bash instead of cmd.
Generate SSH key Windows Using PuTTY
PuTTY is a free and open-source implementation used for terminal emulation in PCs running in Microsoft Windows. It can support several protocols such as SSH, Telnet, SCP, rlogin, and raw socket connection. Using PuTTY, you can generate SSH Key in Windows 10 via Windows terminal. To generate SSH Key in Windows 10 using PuTTY, perform the following steps:
“Also read: connect to your website via SSH”
Step 1: Download PuTTY
If you don’t already have PuTTY on your system, you can download it from this link. After downloading, install it.
Step 2: Install PuTTY
By clicking on the downloaded file, you can start the installation process. You can read this article about Connect to a Linux Server Using PuTTY or Simply follow the installation wizard. On the first page, click on Next.
Next, select the destination folder. The default destination is C drive\Program files\PuTTY\. You can change it to your desired address.
Now, it’s time to select Product Features to be installed. If you do not have any specific requirements, follow the default choice, and click on Install to move to the next screen.
Congratulations. You install PuTTY. You finished the first steps to generate an SSH Key in Windows 10. Now, let’s jump into the next step.
Step 3: Run the PuTTY SSH Key Generator
- Press the Windows key on your keyboard.
- In the search bar, type PuTTYgen (you can also use cmd and type PuTTYgen).
- Right-Click on PuTTYgen, and select Run as administrator.
- If prompted, select YES.
Step 4: Use PuTTY to Generate SSH Key in Windows 10
Now, to generate SSH Key in Windows 10, do the following steps:
- On the PuTTY generator page, click on generate.
- The thing about moving the cursor is obviously a joke, so no need to tire yourself out. Wait until the progress bar is all green.
- Save the public key by clicking on the Save public key button. Choose a location for saving this key and give it a name.
- To save the Private Key, click on the Conversation menu.
- By clicking on Export OpenSSH Key, you’ll be asked, “Are you sure you want to save key without a passphrase to protect it?” Select “yes.”
- Choose a location for saving the Key.
- Give your private key a name.
Congratulations. You’ve managed to generate the SSH key we wanted by using PuTTY, one of the best SSH clients for Windows. Of course, you can also generate keys using OpenSSH, the client native to Windows 10, but the app lacks some of the more essential features, so most prefer using PuTTY or its alternatives.
Also Read : Install MikroTik CHR on VPS (Using PuTTY)
Are SSH Keys Enough for Server Security?
So, it seems you’ve got security handled — you’ll be connected to your server with a secure key, and that’s that. But what about your server? Are you sure it’s secure? Without a security-minded server provider, all the effort you just spent on SSH security will mean nothing. Cloudzy, for example, knows the importance of security to its users and provides an AI-powered firewall and intelligent DDoS protection on all its Linux VPS plans. So, if you want to work with any Linux distro you want without risking double-booting your laptop, you should check out our Linux VPS plans.