The following guide shows how to generate an SSH key in Windows 10 or 11.
- Whether you use Command Prompt or Windows Terminal, type
ssh-keygenand hit Enter. This will automatically generate the SSH keys.
- 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. - Enter the name of your key and hit enter; in this case I have called it "example-key".

- Next, you’ll be asked to enter a passphrase (password). We highly recommend you do this to keep your key secure. You'll be prompted to write the passphrase again, it will re-prompt if they dont match. Once they match it will generate the key
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 you can turn on "Hidden Items" to view it: