Generate SSH keys
11 March 2022 (Updated 24 July 2024)
On this page
Generate keys
ssh-keygen -t ed25519 -C "<email>"
Add key to SSH agent
eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519
Add keys to GitHub
Copy your SSH public key to your clipboard.
macOS:
cat ~/.ssh/id_ed25519.pub | pbcopy
Linux:
xclip -selection clipboard < ~/.ssh/id_ed25519.pub
Add copied key to SSH keys page. Make sure not to add any new lines.
Delete any old and redundant keys.
Sources
Tagged:
SSH
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment