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

Errors persist after updating SSH client to ECDSA

patrick_here
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!
June 13, 2023

I am running Ubuntu 20.04. After following the instructions for the change to ECDSA host keys get the warning shown below:

$ ssh git@bitbucket.org host_key_info
Warning: the ECDSA host key for 'bitbucket.org' differs from the key for the IP address '104.192.141.1'
Offending key for IP in /home/johndoe/.ssh/known_hosts:20
Matching host key in /home/johndoe/.ssh/known_hosts:29
Are you sure you want to continue connecting (yes/no)?
You are using host key with fingerprint:
ecdsa-sha2-nistp256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0

Note however that my ssh does work ...it's just that I also get this warning when I attempt to do a "git push" (the "push" works but I do get the error). 

I have done "$ ssh-keygen -R bitbucket.org" ...and it doesn't help.

Does anyone know the fix?

 

 

1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2023

Hi @patrick_here 

Looks like there are two different host keys which are possible match to bitbucket.org, one in line 20 and one in line 29.

Try commenting out both lines (using `#` at the beginning of the line) and run "$ ssh-keygen -R bitbucket.org && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts"

See more info and helpful commands here: https://bitbucket.org/blog/ssh-host-key-changes?utm_source=alert-email&utm_medium=email&utm_campaign=ssh-key-rotation_EML-15879&jobid=106086164&subid=1685735409  

patrick_here
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!
June 14, 2023

Thank you Erez!  With your input I was able to resolve it!  I commented-out line 20 (which had been present in my known_hosts for years).  Then when I ran "host_key_info" command for the first time I got this warning message:

Warning: Permanently added the ECDSA host key for IP address '104.192.141.1' to the list of known hosts.

   ...but when I ran the "host_key_info" command for the second time, the warning was gone and I got the correct output. 

 

I'm wondering: shouldn't the instructions be changed?  Wouldn't it be logical to expect that everyone else would have a line similar to my line 20 in their known_hosts ...which would need to be removed before adding the new ECDSA host key ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events