Reputation: 191729
I'm trying to ssh into github using a different private key than my original one. It seems like the ssh
request is somehow cached, because no matter what I do when I call ssh -T [email protected]
, it says
Hi [wrong-user] You've successfully authenticated...
I've tried doing a variety of things:
github.user
and user.email
from my .gitconfig
id_rsa
completelyssh -i
with different identity files including an invalid identity file.ssh/config
withHost github.com
HostName github.com
User git
IdentityFile /path/to/private/key/for/right-user
No matter what it seems like I always get a response from github logging in as the wrong user.
Is there something else I can do to tell github to use a different user / private key to authenticate?
Upvotes: 0
Views: 161
Reputation: 3804
You can check your cached ssh keys with ssh-add -l
.
You can delete all cached keys with ssh-add -D
.
Upvotes: 1