Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Lloyd Peltier April 5, 2022

Hello all,

I am getting this error whenever I try to do anything with Bitbucket. All of my personal repos and all the team stuff I am working on.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:eYTtqNXZHMS/TJH1nE4VyvIuF1b3FJDfMH/0D16SFus.
Please contact your system administrator.
Add correct host key in /c/Users/PEL6FH/.ssh/known_hosts to get rid of this mess
Offending RSA key in /c/Users/PEL6FH/.ssh/known_hosts:4
Host key for [sourcecode.socialcoding.bosch.com]:7999 has changed and you have r
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

How can I fix this? I am not a git guru, please be as explicit as possible in any responses. It seems like I need to copy the host .ssh key to my known_hosts file?  Where do I find this host key?

Thank you in advance for any help you can provide.

1 answer

1 accepted

7 votes
Answer accepted
Lloyd Peltier April 5, 2022

I found a solution that works.

  • Go to C:\Users\<your_username>\.ssh
  • Open the known_hosts.txt file
  • Delete the whole section for the RSA key that is giving you the error
  • Then you should be able to use git to clone or fetch or whatever you were trying to do.
shashank
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 6, 2023

Hi @Lloyd Peltier 
I was also getting same error and I tried the above method and it worked, but somehow it added the other sections also in the known_hosts.txt file which were not there when i run ssh-add command via ssh agent. Earlier there were only one entry for bitbucker which are somehow now three. Can you explain why it is so?

Also how to check from where these entries are generated in that known_hosts file?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events