Overview
Creating and using SSH keys for authentication requires 3 minimum steps
- Generate Your Public-Private Key Pair
- Transfer Your Public Key To The Remote Host(s)
- Test Your Private Key
Commands To Run:
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub user1@remotehost
ssh user1@remotehost
Demonstration
Here’s my YouTube short explaining this process:
And here’s a long form video demonstrating this process:
TBA
Extra Information
- SSH key authentication uses asymmetric encryption:
- Public Key encrypts
- Private Key decrypts
- Your Public Key is safe to give to anyone, anywhere. Hence it’s name.
- Your Private Key must be safeguarded.
- If any copies exist, assume your identity is compromised and refresh your key pair.
