Multiple Github Accounts using SSH

D
2 min readJan 29, 2022
Photo by Mohammad Rahmani on Unsplash

With the push towards using SSH instead of HTTPS on Github there has been some situations that a little bit of finessing. Thankfully, there are workarounds to get past this. So a situation came up recently where the team I was apart of had a robot with a single ssh key. However, we wanted to pull in code from various individual’s accounts. Of course, being part of an organisation meant we could create a dev account and simply switch the user.name whenever a person proceeds to commit some code. Alternatively, we can set up multiple SSH keys. Let’s go with the latter because it’s more fun.

Step 1:

Create an SSH key by going into the ssh folder on an Ubuntu and generating the key

cd ~/.ssh
ssh-keygen -f DeveloperA_id_rsa

Step 2:

Next copy the result of this ID and paste it into github (or any git based service really).

cat DeveloperA_id_rsa.pub
Click Settings
Go to SSH Keys and paste the result of the terminal output above

Step 3:

--

--

D

An aspiring Robotics Researcher. I am currently in my 4th year of undergraduate studies. I am working on optimising the ROS navigation packages. Follow 4 more!