How to: Generate an SSH Key

Prev Next

The following guide shows how to generate an SSH key in Windows 10 or 11.

  1. Whether you use Command Prompt or Windows Terminal, type ssh-keygen and hit Enter. This will automatically generate the SSH keys. In our tests on Windows 11, it created a 2048-bit RSA key.


  2. After you type your command hit Enter, and then you’ll be prompted to give your key a name and save it in a specific location. If you use the defaults then it will save your keys in C:\User[YourUserName].ssh —assuming the C drive is where your user account is stored.


  3. Enter the name of your key and hit Enter.
  4. Next, you’ll be asked to enter a passphrase (password). We highly recommend you do this to keep your key secure.



  5. That’s it your keys are created, saved, and ready for use. You will see you have two files in your “.ssh” folder: “id_rsa” with no file extension and “id_rsa.pub.” The "id_rsa.pub" is the key you upload to servers to authenticate while “id_rsa” is the private key that you don’t share with others.


----------------------------------------------------------------------------------

Note: If you can’t see your “.ssh” folder in File Explorer here is how: