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?
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
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.