How to unlink the previous SSH key in Git

I have followed the following steps to create and add a SSH key and deleted all the previously created keys in the folder ~/.ssh/

  • $ ssh-keygen -t rsa -b 4096 -C "[email protected]"
  • $ eval "$(ssh-agent -s)"
  • $ ssh-add -K ~/.ssh/id_rsa
  • $ clip < ~/.ssh/id_rsa.pub and then added the content in Git

Then I try:

  • $ git push -u origin master

and I get:

The authenticity of host 'github.com (140.82.121.4)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?

(That key is one of the previous I had created and deleted)

What can I do to overcome this issue?

3

1 Answer

The authenticity of host 'github.com (140.82.121.4)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?

This message has nothing to do with the key that you created. The SSH server that you connected to starts by identifying itself to your ssh client, and this message means that your client doesn't recognize the server that it connected to. You'll get a message like this the first time you connect to any SSH server.

You would generally reply to this by typing "yes" and pressing [enter], unless you have a particular reason to believe something funny is going on.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like