Header Ads

Seo Services

Multiple SSH Keys settings for different github account

Multiple SSH Keys settings for different github account

Multiple SSH Keys settings for different github account


1, create ssh in github

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
~/.ssh/id_rsa
~/.ssh/vs-team


2, add ssh key


$ ssh-add ~/.ssh/id_rsa
$ ssh-add ~/.ssh/vs-team


3, you can delete all cached keys before


$ ssh-add -D

4, finally, you can check your saved keys


$ ssh-add -l

Modify the ssh config


$ cd ~/.ssh/
$ touch config 
$ nano config

Then Add 


#Github account
 Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa

#VSCode account
Host vs-ssh.visualstudio.com
HostName vs-ssh.visualstudio.com
User git
IdentityFile ~/.ssh/vs-team


Done, Like and share fanpage !!




No comments