SSH keys explained — make your own key pair
A key pair is two matching files. The private key never leaves your PC. The public key is copied to every server you want to log in to. Anyone may see the public key; it only checks signatures, it cannot make them.

Which key type?
- Ed25519 — short, fast, the default choice for anything made in the last ten years. Use this.
- RSA 4096 — only for very old servers or appliances that do not understand Ed25519.
- Always set a passphrase. It encrypts the private key file, so a stolen laptop is not a stolen login. Pageant (next lessons) means you type it once a day, not every time.
Option A — Windows built-in OpenSSH (PowerShell)
ssh-keygen -t ed25519 -a 100 -C "you@laptop"
Press Enter to accept C:\Users\you\.ssh\id_ed25519 and type a passphrase twice. Here is the same command on a Linux machine — the output is identical on Windows:


Option B — PuTTYgen (.ppk for PuTTY and WinSCP)
- Start PuTTYgen. Under Parameters choose EdDSA with curve Ed25519.
- Click Generate and move the mouse over the blank area until the bar fills.
- Type a Key comment (e.g.
you@laptop) and a Key passphrase twice. - Save private key →
C:\Users\you\.ssh\id_ed25519.ppk. - Copy the whole text box “Public key for pasting into OpenSSH authorized_keys file” — that single line is your public key.
Already have an OpenSSH key? Convert, don't regenerate
- PuTTYgen → Conversions → Import key → pick
id_ed25519→ enter passphrase → Save private key as.ppk. - WinSCP does the same automatically: point it at an OpenSSH key and it offers to convert it to
.ppk. - Going the other way: PuTTYgen → Conversions → Export OpenSSH key.
Rules for the private key
- Never email it, paste it into chat, or commit it to Git.
- One key per person per device. Lose the laptop → remove that one public key from the servers.
- Back the private key up only to an encrypted store (a password manager attachment works well).
Try it — make your key
- Create an Ed25519 key with a passphrase using option A or B.
- Run
ssh-keygen -lf $env:USERPROFILE\.ssh\id_ed25519.puband write the SHA256 fingerprint down — you will see it again in the server log.
Rating
0
0
There are no comments for now.
Join this Course
to be the first to leave a comment.