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

  1. Open Terminal and run:
ssh-keygen -t ed25519 -C "your_email@example.com"
  1. When prompted for a file location, press Enter to use the default location

  2. Enter a secure passphrase (required for our team)

  3. 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

  1. Copy your public key to clipboard:
pbcopy < ~/.ssh/id_ed25519.pub  # macOS
# OR
cat ~/.ssh/id_ed25519.pub  # Linux (copy manually)
  1. Go to GitHub -> Settings -> SSH and GPG keys -> New SSH key

  2. Give your key a descriptive title (e.g., "Work MacBook Pro")

  3. Paste your public key in the "Key" field

  4. Click "Add SSH key"

  5. 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-agent to avoid typing your passphrase repeatedly:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519