New SSH keys for GitHub
2026-04-03
What: Generate new SSH keys and add them to your GitHub account.
Why: So you can safely use GitHub remotely on your linux machine without the use of clear text passwords.
Recipe
Step 1
Log into your linux machine as the user that needs to access GitHub.
Step 2
Generate new SSH keys (if they don't exist):
ssh-keygen -t ed25519 -C "your@email.here"
Use the same email as on GitHub.
Step 3
Copy the new ed25519 public key from the terminal:
cat ~/.ssh/id_ed25519.pubStep 4
Add to GitHub account.
Settings / SSH and GPG keys. Click "New SSH key".