Fill these in once
- Create the key
ssh-keygen -t ed25519 -C "you@example.com"Press Enter to accept the default file. Add a passphrase if you like.
- Tell your Mac to remember it
cat >> ~/.ssh/config <<'EOF' Host github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519 EOF ssh-add --apple-use-keychain ~/.ssh/id_ed25519 - Copy the public key
pbcopy < ~/.ssh/id_ed25519.pub - Open GitHub and paste it
open https://github.com/settings/ssh/new
Check it worked
- Test the connection
ssh -T git@github.comType "yes" if asked. You should see "Hi
! You've successfully authenticated".
Undo it
- Delete the key from this machine
rm ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pubAlso remove it on github.com/settings/keys.
- Create the key
ssh-keygen -t ed25519 -C "you@example.com"Press Enter to accept the default file. Add a passphrase if you like.
- Load it into the SSH agent
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 - Show the public key, then copy it
cat ~/.ssh/id_ed25519.pub - Open GitHub and paste it
xdg-open https://github.com/settings/ssh/new
Check it worked
- Test the connection
ssh -T git@github.comType "yes" if asked. You should see "Hi
! You've successfully authenticated".
Undo it
- Delete the key from this machine
rm ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pubAlso remove it on github.com/settings/keys.
- Create the key
ssh-keygen -t ed25519 -C "you@example.com"Press Enter to accept the default file. Add a passphrase if you like.
- Start the SSH agent automaticallyRun as administrator
Get-Service ssh-agent | Set-Service -StartupType Automatic Start-Service ssh-agent - Load the key
ssh-add "$env:USERPROFILE\.ssh\id_ed25519" - Copy the public key
Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub" | Set-Clipboard - Open GitHub and paste it
Start-Process "https://github.com/settings/ssh/new"
Check it worked
- Test the connection
ssh -T git@github.comType "yes" if asked. You should see "Hi
! You've successfully authenticated".
Undo it
- Delete the key from this machine
Remove-Item "$env:USERPROFILE\.ssh\id_ed25519", "$env:USERPROFILE\.ssh\id_ed25519.pub"Also remove it on github.com/settings/keys.

New to GitHub? I explain it in plain English on Layman Terms.