🔑SSH Key Pair
Also known as SSH Key, SSH Keys, Private Key (SSH), Public Key (SSH), id_ed25519
Two matching keys for SSH. You keep the private one and share the public one.
Think of it like
Think of it like a padlock and its key. You hand out the padlock, and you keep the key.
Example
Lucy makes one key pair on her laptop. She puts the public key on four servers and logs in to all of them with no password.
Why it matters
Keys are far harder to guess than passwords. Most servers should only let keys in.
Definition
Example code
console
$ ls ~/.ssh
id_ed25519 id_ed25519.pub known_hostsCommon mistake
Key takeaways
- 1Private stays home. Never copy it to a server.
- 2Public goes out. Put it on each server.
- 3Sign and check. No secret crosses the line.