0

I've created a new ssh key using:

ssh-keygen -t rsa -b 4096 -C <my-email>

I've added the new key to github in my GitHub account settings. I've added the following to my "config" in my .ssh folder:

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa

When I attempted to verify my GitHub account by using:

ssh -T -ai ~/.ssh/id_rsa git@github.com

I get back someone else as an acknowledgement.

Hi xxxx/yyyy! You've successfully authenticated, but GitHub does not provide shell access

What could be causing this?

I've deleted the old id_rsa keys and generated new ones.

I expected it to show:

Hi my name/my_repo! You've successfully authenticated, but GitHub does not provide shell access
double-beep
  • 5,031
  • 17
  • 33
  • 41

1 Answers1

0

You need to double-check that your ~/.ssh/id_rsa.pub is indeed registered in new GitHub setting account.

The testing SSH page mentions:

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

So it should not be name/myrepo, but only name.

The OP confirms in the comments a passphrase issue:

Started a new terminal session.
Ran eval ssh-agent -s, added the new rsa key using: ssh-add ~/.ssh/id_rsa

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for your reply. I did checked out the link you had previously prior to this post. The key is a new rsa key. I've deleted the old one in hope that it was the cause of the problem but it still shows the same result. I am also not sure why the reply from Github returns a path to a repo along with the username. Any further help is much appreciated. – Matt D Johnson Jul 13 '19 at 20:16
  • @user1623617 Just for context, what OS are you using? What version (of the OS and of Git)? – VonC Jul 13 '19 at 20:19
  • @user1623617 For testing, can you make a key (and registered it) with the old openssl PEM format? https://stackoverflow.com/a/53645530/6309 – VonC Jul 13 '19 at 20:20
  • Got it figured out. Started a new terminal session. Ran ```eval `ssh-agent -s` ```. Added the new rsa key using: ```ssh-add ~/.ssh/id_rsa```. Thanks so much for your help. – Matt D Johnson Jul 13 '19 at 21:13
  • @user1623617 Great! I have included your comment in the answer for more visibility, with a link for documentation. – VonC Jul 13 '19 at 21:18