/github-for-non-tech

How to add SSH key to GitHub?

Learn how to add an SSH key to GitHub with our step-by-step guide—check for an existing key, generate a new one, add it to the agent, copy, and test your connection.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to add SSH key to GitHub?

 
Step 1: Check for existing SSH keys
 

Before creating a new SSH key, verify whether you already have one on your machine.

  • Open a terminal (Git Bash on Windows, Terminal on macOS/Linux).
  • List existing SSH keys in the default directory:
ls -al ~/.ssh

Look for files named id_rsa, id_ed25519, etc. If you already have a key you want to use, skip to Step 4.

 
Step 2: Generate a new SSH key
 

Create a new SSH key pair using the Ed25519 algorithm (recommended) or RSA if needed.

ssh-keygen -t ed25519 -C "your\[email protected]"

When prompted:

  • Accept the default file location by pressing Enter.
  • Optionally enter a passphrase for added security, or press Enter twice for no passphrase.

 
Step 3: Add your SSH private key to the SSH agent
 

The SSH agent manages your keys and passphrases during a session.

  • Start the SSH agent in the background:
eval "$(ssh-agent -s)"
  • Add your private key to the agent (replace id\_ed25519 if you used a different name):
ssh-add ~/.ssh/id\_ed25519

 
Step 4: Copy the SSH public key to your clipboard
 

You need to copy the contents of your public key file (\*.pub) to GitHub.

  • On macOS:
pbcopy < ~/.ssh/id\_ed25519.pub
  • On Linux (with xclip installed):
xclip -sel clip < ~/.ssh/id\_ed25519.pub
  • On Windows (Git Bash):
clip < ~/.ssh/id\_ed25519.pub

 
Step 5: Add the SSH key to your GitHub account
 

Now paste the copied key into your GitHub SSH keys settings.

  • Navigate to https://github.com/settings/keys.
  • Click New SSH key or Add SSH key.
  • Enter a descriptive Title (e.g., “Work Laptop Key”).
  • Paste your key into the Key field.
  • Click Add SSH key.
  • If prompted, confirm with your GitHub password.

 
Step 6: Test your SSH connection
 

Verify that GitHub recognizes your key.

  • In your terminal, run:
ssh -T [email protected]

You should see a message like:

Hi username! You've successfully authenticated, but GitHub does not provide shell access.

 
Step 7: Configure Git to use SSH (optional)
 

If you cloned repos over HTTPS, update the remote URL to SSH:

  • Navigate to your repository folder:
cd path/to/your-repo
  • Change the remote URL:
git remote set-url origin [email protected]:username/your-repo.git
  • Verify the change:
git remote -v

You’re now set up to securely communicate with GitHub over SSH!

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022