This is my ssh-config
-
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_gortnm // vansham-gortnm
IdentityFile ~/.ssh/id_rsa_github // vanshamagg
And I am using the command ssh -N github.com
to check which account connects to.
I get the response something like -
Hi vanshamagg! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.
When I specify only one Identity it connects to the right account. But whenever I add both Identities, it always connects to vanshamagg
no matter in what order I specify the keys.
Any ideas why it might be happening?