SSH Key Auth for Two Github Accounts
Today I Learned Sometimes I have needed/wanted to keep authentication via SSH keys to my two Github accounts in the same machine. For such, the following arrangement in the .ssh/config file seems to work: Github Account Number 1: alex Host github.com-alex HostName github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/alex-key IdentitiesOnly yes Github Account Number 2: xander Host github.com-xander HostName github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/xander-key IdentitiesOnly yes Explanation: Host: It is like an alias for the host to which I will connect.