Step 1 – How to generate a ssh key pair?
$ ssh-keygen -t rsa -C “devops@RajeshKumar.xyz”
Step 2 – Upload 2 different public key in 2 github accounts.
Step 3 – Lets say, the github account name is myaccount1 or myaccount2 when pushing to GitHub, you will need to create aliases for git@github.com in ~/.ssh/config, such as:
Host github-myaccount1
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_dsa-myaccount.pub
Code language: JavaScript (javascript)
Host github-myaccount2
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_dsa-myaccount2.pubCode language: JavaScript (javascript)
How to validate which user is set?
ssh -T git@github.com
Git Tutorials | Github Tutorials | Git using Github Crash Course
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals