How to generate an SSH key in Windows 10

The Windows Club

In this guide, we will see a simple method to generate a SSH key on Windows 10. SSH or Protective cover is a cryptographic network protocol that creates a secure tunnel over the insecure network so that your data can be transferred between the server and the clients in encrypted form.

For example, suppose I have a home network and it is not secure. In this case, if I have to transfer data from a source to a destination, it can be attacked by cyber criminals using the Man in the middle (MITM) approach. However, if I use the SSH protocol to perform the same task, the communication would remain secure using cryptographic technology.

Generate an SSH key in Windows 10

In order to generate the SSH key in Windows 10, you must first make sure that you have installed the OpenSSH Client feature on your device. OpenSSH supports all versions of the SSH protocol and offers secure tunneling capabilities. It encrypts all your traffic and avoids the risk of diversion.

So open Windows settings and go to Applications> Applications and Features. In the right pane, click on the Optional features link.

Now check if the OpenSSH client is available on the list.

If it is not available in the list, click on the Add a feature button. To select OpenSSH client in the list, then install it.

After a proper installation, restart your computer to be sure.

generate-key-SSH in Windows-10

In the next step, open the command prompt. Once it opens, type the following command line and press Enter.

ssh-keygen

At this point, the system will ask you to save the default location. You can do this by pressing the Enter key. You can also change the path as needed. However, by default, it offers the location in the following form:

C:users.sshid_rsa

After that, the system asks you to set a password (passphrase). By typing the password, you will not see anything but it will be saved there. Then enter the same password to confirm it.

If you wish, you can continue without setting a password. To do this, simply press the Enter key otherwise, enter the passphrase there.

When you press the Enter key, your key’s fingerprint and SHA256 appear. The default algorithm is RSA 2048.

The public key will be saved in the id_rsa.pub file. By default, it is in the following form:

C:users.sshid_rsa.pub

We recommend that you do not share the private SSH key (id_rsa) for obvious reasons.

I hope this guide would be helpful in generating SSH keys for your system.

Leave a Reply