Short version:
Is there a way to configure automatic public key ssh authentication from one Linux account to two different Github accounts?
I have two Github accounts, one working and personal, which I want to completely separate.
I already set up automatic ssh authentication (using my ~ / .ssh / id_rsa.pub file) in my Github account. It works great.
When I try to add the same ssh key to my personal Github account, I get a "key already in use" error message.
EDIT: OK, I think it’s possible to do what I want to do with the appropriate settings in ~/.ssh/config
, but I still do not understand what it should be. First, it’s not clear to me how to specify two different authentication details ( User
, IdentityFile
) for the same host ( github.com
), and as soon as I do this, I don’t see how git knows which of the two keys to be present when I do git push
.
source
share