Your cart is currently empty!
How to Generate SSH keys in Windows 11
SSH keys are a safer way to connect to servers, services, and repositories without typing your password every time. If you’re using Windows 11, good news: generating SSH keys is quick and straightforward. Here’s how to do it, step by step.
What You Need
- A PC running Windows 11
- No extra downloads—Windows 11 already comes with the tools you need
Steps to Generate SSH Keys in Windows 11
1. Open Windows Terminal
- Right-click the Start button and choose Terminal (or Windows Terminal).
- Alternatively, press Win + X and select Terminal.
2. Check for Existing SSH Keys
Before creating a new key, see if you already have one:
cd %USERPROFILE%\.ssh
dir
If you see files named id_rsa
and id_rsa.pub
(or id_ed25519
and id_ed25519.pub
), you already have SSH keys. If you want to generate new ones, proceed.
3. Generate a New SSH Key Pair
Use the built-in ssh-keygen
tool:
ssh-keygen -t ed25519 -C "[email protected]"
- If your system doesn’t support
ed25519
, you can usersa
instead:ssh-keygen -t rsa -b 4096 -C "[email protected]"
What does this do?
-t ed25519
tells Windows to use the modern Ed25519 algorithm (recommended).-C
adds a label (like your email) to the key for reference.
4. Follow the Prompts
- Save location: Just press Enter to accept the default location (
C:\Users\YourName\.ssh\id_ed25519
). - Passphrase: You can add an extra password (optional but more secure). Otherwise, press Enter to skip.
5. Add Your SSH Key to Your Account/Service
- Your public key is the file ending in
.pub
(e.g.,id_ed25519.pub
). - Open it with Notepad:
notepad %USERPROFILE%\.ssh\id_ed25519.pub
- Copy the entire contents and paste it into your GitHub, GitLab, or server’s SSH settings.
Done! You’re Ready to Use SSH
From here, you can use SSH keys for secure logins, push to git repositories, or connect to servers—no more passwords.
Pro Tip:
Never share your private key (the file without .pub
) with anyone. Only share the public key.
Troubleshooting
- Don’t see
ssh-keygen
?
Make sure you’re in the Terminal, not PowerShell or Command Prompt. You can typewhere ssh-keygen
to check if it’s installed. - Getting “Permission denied” errors?
Double-check that you copied the public key correctly and pasted it into the right place on your service or server.
Have questions? Drop them in the comments below, and I’ll help you out!
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!