This is just a self reminder of how to do this and not have to google it every time I need to add a new one.
These steps are solid as they are, but might change over time to create more robust documentation on it.
These steps are all performed from the terminal.
Create your ssh key with your github email
ssh-keygen -t ed25519 -C "your_email@example.com"
Optional
- Name your file name and route when prompted this:(use the site name you are creating the key for id purposes).
Enter file in which to save the key (/Users/dgplatac/.ssh/id_ed25519):
- Enter a passphrase for added security when prompted this:
Enter passphrase (empty for no passphrase):
Add Your SSH Key to the ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Copy your ssh key to the clipboard
cat ~/.ssh/ed25519.pub | pbcopy
Remember to use the correct file name and path.
Add Your SSH Key to Your GitHub Account
- On GitHub, navigate to your settings by clicking your profile photo, then click Settings.
- In the user settings sidebar, click SSH and GPG keys.
- Click New SSH key or Add SSH key.
- In the “Title” field, add a descriptive label. For example, if you’re using your personal laptop, you might call this key “Personal Laptop”.
- Paste your key into the “Key” field.
- Click Add SSH key.
Test Your SSH Connection
ssh -T git@github.com
The following message should display
The authenticity of host 'github.com (IP ADDRESS)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
answer yes and the following should display:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
Silverboi
Top comments (0)