SSH Keys
SSH keys provide secure authentication for Git operations and server access. We standardize on ED25519 keys for their security and performance advantages.
Generating ED25519 SSH Keys
- Open Terminal and run:
ssh-keygen -t ed25519 -C "your_email@example.com"
-
When prompted for a file location, press Enter to use the default location
-
Enter a secure passphrase (required for our team)
-
Verify your key was created:
ls -la ~/.ssh
You should see:
id_ed25519(private key - never share this)id_ed25519.pub(public key - safe to share)
Adding Your SSH Key to GitHub
- Copy your public key to clipboard:
pbcopy < ~/.ssh/id_ed25519.pub # macOS
# OR
cat ~/.ssh/id_ed25519.pub # Linux (copy manually)
-
Go to GitHub -> Settings -> SSH and GPG keys -> New SSH key
-
Give your key a descriptive title (e.g., "Work MacBook Pro")
-
Paste your public key in the "Key" field
-
Click "Add SSH key"
-
Test your connection:
ssh -T git@github.com
You should see: "Hi username! You've successfully authenticated..."
Key Management Best Practices
- Use a password manager to store your SSH key passphrase
- Never share your private key
- Use different keys for different services when possible
- Consider using
ssh-agentto avoid typing your passphrase repeatedly:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519