Generate SSH Key in Windows 10 or Windows 11

Stefan
Generate SSH Key in Windows 10 or Windows 11

If you want to remotely connect to an SSH server with key authentication or use GitHub to manage your code, you will need an SSH key pair.

In Ubuntu Linux and other Unix-like systems, generating and managing an SSH key and using key-based authentication is quite simple.

If you are using a Windows computer, the steps may be a little different. Windows 11 has a built-in OpenSSH package and commands that you can use to generate and manage keys from the Command Prompt, Windows Terminal, or PowerShell.

If you are going to use the SSH keys, then you should definitely use Windows Terminal, which is installed by default in Windows 11. Windows Terminal offers a better experience and better features, and can have the Command Prompt, PowerShell, and the Windows Subsystem for Linux all in one window to carry out.

If you want to use SSH key authentication or use SSH key-based authentication, you will need to create a pair of SSH keys. This is how it works.

Generate SSH Key in Windows 10 or Windows 11

In this example, I'm using the Command Prompt instead of Windows Terminal. Although Windows Terminal is recommended.

Click on the start button. In the search window type: Command Prompt and click “Run as Administrator”.

In the Command Prompt type:

ssh-keygen

You will be asked where you want to store the “key”. By default this is the user folder of the logged in user, namely C:\Users\username/.ssh/

Create ssh keygen

You must then enter the same “passphrase” twice. A “fingerprint” and a random image are created.

create ssh key in windows

The key has now been created. Now open the Windows Explorer and open the user folder and the “.ssh” folder. You will now see two files, namely “id_rsa” and “id_rsa.pub”.

Read also
Disable Thumbs.db file in Windows 11 or Windows 10

ssh file lookup in Windows

I hope this helped you. Thank you for reading!


Problem solved?


Help other people too.
Share this article on a website, forum or via social media.

Join our new computer forum for questions and computer help.
Do you have a computer question?

The email address will not be published. Required fields are marked with *