andriangungon
7/25/2018 - 9:30 AM

multiple ssh key

references: https://medium.freecodecamp.org/manage-multiple-github-accounts-the-ssh-way-2dadc30ccaca https://gist.github.com/jexchan/2351996

using multiple account is kinda tricky, has to add your info to config. edit na config file not the .config(swp)

once generated ssh key

step1: eval ssh-agent -s or eval $(ssh-agent) step2: ssh-add ~/.ssh/id_rsa_wintermelon

#user1 account
 Host bitbucket.org-wintermelon
     HostName bitbucket.org
     User git
     IdentityFile ~/.ssh/id_rsa_wintermelon
     IdentitiesOnly yes

 #user2 account
 Host bitbucket.org-manilacreatives
     HostName bitbucket.org
     User git
     IdentityFile ~/.ssh/id_rsa
     IdentitiesOnly yes