Explosion Pills
Explosion Pills

Reputation: 191729

Change github user / private key

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:

Host 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

Answers (1)

mofoe
mofoe

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

Related Questions