Buddy Bob
Buddy Bob

Reputation: 5889

successfully authenticated into github under wrong user

I have run ssh -T [email protected] to check my connection SSH connection, and I got the following result -

Hi e***! You've successfully authenticated, but GitHub does not provide shell access.

Now, this is not my GitHub user and I don't know how to change it.

Upvotes: 0

Views: 106

Answers (1)

To work with ssh or any asymmetric key encryption protocols, you should get a grasp of the concept of how public and private key pair works. Only until then, what I will say below makes sense:

  • The command ssh -T [email protected] shows the user who has added your public key to their account. What this command does is it sends your public key to Github's server, GitHub then tries to verify if you are actually the owner of this public key (by testing your private key with some encrypted data). If so, it finds the account in its database that associates with this public key and returns the result that you're seeing on the screen.
  • Should you be worried? No, because your public key is supposed to be public, and anyone could grab your key and unintentionally add that to their GitHub account. Other than you can access their GitHub's private repositories, they can do nothing to your computer or your GitHub account.
  • If you still have read and write access to your GitHub's repositories (e.g., git clone or git push), there's nothing else to do.

Edit:

  • If you've already added your public key to your GitHub account and ssh -T [email protected] still outputs their GitHub's account name, I think it's because GitHub finds their account first and return that right away.

Upvotes: 1

Related Questions