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
Host github-myaccount2
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_dsa-myaccount2.pub
How to validate which user is set?
ssh -T git@github.com
Git Tutorials | Github Tutorials | Git using Github Crash Course
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND