Setup Github SSH Key

Kevin FOO
Jan 23, 2025

--

Check if ssh-agent is running, generate and add key with the commands below.

# check if ssh agent is running
eval "$(ssh-agent -s)"

# list all keys configured with ssh agent
ssh-add -l

# generate a new key
ssh-keygen -t ed25519 -C "your_email@example.com"

# add key to ssh agent
ssh-add ~/.ssh/id_ed25519

Copy the content of the public key id_ed25519.pub to clipboard.

cat ~/.ssh/id_ed25519.pub

Give it a title like “My Laptop” then paste the content of id_ed25519.pub into key and click [Add SSH key]

Test if the key was properly configured by using the command below.

ssh -T git@github.com

# if successful you will see a similar message
# Hi <username>! You've successfully authenticated, but GitHub does not provide shell access.

< Back to all the stories I had written

--

--

Kevin FOO
Kevin FOO

Written by Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.

No responses yet