GitHub SSH Key
In this short How-To article, we will generate an ssh key for accessing GitHub from a Linux device.
Generate SSH Key
ssh-keygen -t ed25519 -C "your@email.com"
Select the location where the key will be stored or leave empty for selecting the default location (~/.ssh/id_ed25519
).
Enter a passphrase to protect the key or leave the field empty to proceed without a passphrase.
Add SSH Key to SSH Agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Add SSH Key to GitHub
- Navigate to https://github.com/settings/keys
- Click New SSH key
- Choose a Title for the SSH key and paste the content from
~/.ssh/id_ed25519.pub
to the field of the key. - Click Add SSH key
Enjoy Reading This Article?
Here are some more articles you might like to read next: