How to Create an SSH Key in Windows 10

SSH keys are used to access dedicated servers or VPS securely through the command line. It is therefore an interesting tool to create a secure tunnel over the network and to be able to transfer between the server and the client in a secure and encrypted way. So in this article we are going to explain how to easily create an SSH key in Windows 10 operating system.

What is an SSH key

An SSH key (it has a public and private part) is used to connect a client to a server. It is interesting since it avoids having to enter a password every time we want to access a certain server. The process, once configured, is automatic. An important point is that we do not have to send the password over the network.

Create an SSH Key in Windows 10

These types of keys also decrease the risk of brute force attacks and thus prevent a potential attacker from guessing the credentials correctly. Safety is a very important factor and must always be kept in mind.

How to create an SSH key in Windows 10

Generating an SSH key in Windows 10 is very simple and fast. You just have to follow a series of steps that we are going to mention in this article. The first thing we have to do is make sure we have the OpenSSH client installed on our system. Normally, this is the case, but we can easily verify it.

To find out if we have the OpenSSH Client installed in Windows 10 we have to go to Start, there we go to Settings, we go to Applications, Applications and features and once we are here we have to access Optional Features. OpenSSH should appear there, as we can see in the image.

OpenSSH en Windows 10

In case we see that OpenSSH is not available we will have to add it. To do this, click on Add a feature, an option that we will see above the window that we have accessed. Later we just have to look for OpenSSH Client in the list that appears and we give it to install. We finish the process and restart the computer to make sure it has been installed correctly. From that moment we will have it correctly installed and available on our Windows 10 system.

Once we make sure that we have OpenSSH installed, either because we had it previously or because we have added it as we have mentioned, we can go to the next step. Now we have to open Command Prompt with administrator permissions. For this we go back to Start and write Command Prompt. We have to run the ssh-keygen command.

When we execute this command, the first thing it will ask us is to choose a location to host it. We can choose a folder from our team or simply the one that comes by default. If we opt for this option we just have to press Enter and move on to the next point.

By default the location will be C: usersname.sshid_rsa, unless we have put a different one.

In this next step you will ask us to enter a password . We will see that when starting to write nothing appears and it is as if we were not entering any value. However the password is being generated. When we put it, we give Enter and it will ask us a second time for that password to be generated.

Once we press Enter again the key that we have generated will appear. We will see that the default algorithm is RSA 2048 . There the private key will appear and also the public key.

Crear clave SSH en Windows 10

If we enter the folder in which the SSH key has been generated, we will see that the file is there.

In short, following these steps we have mentioned we can create an SSH key in Windows 10. We already know that it is the most used operating system today on desktop computers.