Public/private key
I just watch this video https://youtu.be/ZhMw53Ud2tY and the question I have is if I have to generate a public/private key pair for each server I’m looking to login to or if I just generate one pair and use that for each server. Somehow that last option seems to be like using the same password for each account.
Is it wise to store the keys in a password manager btw? I’m using keepass as password manager.
If you:
- Keep your private key only on your workstation(s) (good ol' common sense)
- Put a good passphrase on your private key (protects you from a hacker stealing your private key)
- Use and configure agent forwarding properly (reduces the need to keep your private key on other devices)
you should not need a keypair per server.
Think about it - should your workstation be compromised, the hacker is going to take all your keys - whether it's 1 pair or 20 pairs for 20 servers you log into.