I followed the instructions about the new host keys:
https://bitbucket.org/blog/ssh-host-key-changes
After that, when I tried to pull something from bitbucket, I got:
Warning: the ECDSA host key for 'bitbucket.org' differs from the key for the IP address '2406:da00:ff00::22e9:9f55'
Offending key for IP in /home/josir/.ssh/known_hosts:32
Matching host key in /home/josir/.ssh/known_hosts:166
I tried to remove all bitbucket keys:
ssh-keygen -R bitbucket.org
and replay the process. But the same problem occurs.
I also noticed that "curl https://bitbucket.org/site/ssh" is returning a different format that known_hosts stores.
I'm using Ubuntu 22.04
Could someone help me with that?
Hi folks, problem solved by support.
1) To remove duplicates entries:
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
2) To add new entries:
curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
3) To test if works:
ssh git@bitbucket.org host_key_info
The answer could be 2 entries (blog just note one of them):
256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0 bitbucket.org (ECDSA)
256 SHA256:ybgmFkzwOSotHTHLJgHO0QN8L0xErw6vd0VhFA9m3SM bitbucket.org (ED25519)
Thanks, @josir works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @josir this saved me a lot of time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks, saved a day of debugging :pray:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ChatGPT was clueless. Award goes to human this time. Thanks mate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @josir
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.
I had the exact same issue. This worked like a charm!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It worked.! Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
after using this commands this is What I can see:
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
# Host bitbucket.org found: line 5 type RSA
# Host bitbucket.org found: line 6 type ECDSA
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 836 100 836 0 0 2319 0 --:--:-- --:--:-- --:--:-- 2315
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~# curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 836 100 836 0 0 2305 0 --:--:-- --:--:-- --:--:-- 2303
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~#
root@-Frontend:~# ssh git@bitbucket.org host_key_info
key_read: uudecode AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUObitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M=
failed
key_read: uudecode AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUObitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M=
failed
Permission denied (publickey).
Can someone help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
generate an ed25519 key if not done yet
ssh-keygen -t ed25519
At bitbucket add an new SSH Key visiting this Page
https://bitbucket.org/account/settings/ssh-keys/
Drop in the content from "id_ed25519.pub"
now it should work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did what @magic77 suggested:
now what we have:
ssh git@bitbucket.org host_key_info
You are using host key with fingerprint:
ecdsa-sha2-nistp256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0
See https://bitbucket.org/blog/ssh-host-key-changes for more detaills.
is it right?
but my pipelines still fails with this error:
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gennarokey verification is correct now.
what helped for me was to edit known_hosts and removing all bitbucket entries
than run this command and try again
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
if it fails again, than you should check if you setup ssh key for pipelines too for your repo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@magic77 I have two known_hosts (I don't know why)
in ~/.ssh/known_hosts
i can see:
|1|GXXkl0+3UrHVxtXgkGrho0a6CYo=|9uUYtTnj/od4FEE9+wecfnZ824k= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAwbRs1nivqZp6LcqI3i0x4cch5SkfVbfZK/0xZAT/q8XtmKEkgdGQ70ktmy2A4G+WbVq7bLrR+blqMUAEHoIfg=
|1|O4NNAVSC1tjy3zGxgKgdgIr6Uw4=|TVqTeA4ggJDGwt3wAnqIWljylYs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGtVO21yPG3iUWvUnZokkIZHZYUL8SRNCsULvg6ony4YoxzfeJA+4Rt04sibB6Z8QjuBo12WLZCl4U0jdxHrzUw=
|1|bPzBAG1Yhbu03vsUTNjYEMGzrxc=|jyD5XB4x5WWOk2kjfTF6blIe+XY= ecd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R2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
what lines should I delete? In witch of two files?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gennaronormally ssh uses the default folder "~/.ssh", but maybe you have an config file inside .ssh with additional ssh configuration setups
but try to run this command first
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
and than check if you have access to repo, if not check ssh config for pipelines at bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@magic77 I used the command
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
if I do the check
ssh git@bitbucket.org host_key_info
You are using host key with fingerprint:
ecdsa-sha2-nistp256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0
See https://bitbucket.org/blog/ssh-host-key-changes for more details.
root@Stocksmetic-Frontend:~/.ssh#
but the pipeline still fails:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
@Gennaro, I see that you created a ticket with the support team. Please provide in the support ticket the URL of the Pipelines build that fails and the engineer working on your ticket will look into this.
@Aravinth Kandasamy, just a heads up, it is not necessary to generate new SSH keys to connect to Bitbucket Cloud, if you already had SSH keys set up. (It is not a problem that you did though)
The "Permission denied" error means that your private SSH key is not being offered when you ssh to bitbucket.org.
You can create a file named config in your ~/.ssh folder and add the following content in this file:
Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
Then try executing the command git@bitbucket.org host_key_info again.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Edit: Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Theodora Boudale Thanks for your suggestion. It worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works, thanks!
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.
Brilliant, thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks brother!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I noticed the same: curl https://bitbucket.org/site/ssh" is returning a different format
Go to the site using the browser and copy the content into ~./ssh/known_hosts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Julian! This worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same here, curl didn't work, but copy and paste directly from the link to the known_hosts file worked fine! Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SUP Guys!!!
I Have the same problem, but, unfortable I use powershell, and in powershell this commands didn't work.
Could someone help me? Please
Warning: the ECDSA host key for 'bitbucket.org' differs from the key for the IP address '104.192.141.1'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For us we had to add a newline to the end of the curl command that was provided in the guide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent! Fixed the issue, thx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had the same Problem and tried with
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
Testing connection fails with:
Permission denied (publickey)
does somebody has an Idea?
EDIT: my fault, forgot to add the new SSH Key to bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @josir,
You can create a ticket with the support team and a support engineer will help you with these issues. You can create a ticket via https://support.atlassian.com/contact/#/
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be great if you could share the answer when you get it, Josir. Thanks! I am having the same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am having the same issue too :
$ ssh git@bitbucket.org host_key_info
Warning: the ECDSA host key for 'bitbucket.org' differs from the key for the IP address '***.***.***.*'
Offending key for IP in /c/Users/mm/.ssh/known_hosts:9
Matching host key in /c/Users/mm/.ssh/known_hosts:14
Are you sure you want to continue connecting (yes/no)? yes
You are using host key with fingerprint:
ecdsa-sha2-nistp256 SHA256:****
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys, I have the same issue too. Thank you in advance for the answer!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having this issue too after following the steps from https://bitbucket.org/blog/ssh-host-key-changes.
$ git pull
Warning: the ECDSA host key for 'bitbucket.org' differs from the key for the IP address 'xxx.xxx.xxx.x'
Offending key for IP in /home/dyeyuen/.ssh/known_hosts:6
Matching host key in /home/dyeyuen/.ssh/known_hosts:30
Are you sure you want to continue connecting (yes/no)? yes
From bitbucket.org:my_org/my_repo
...leaving this comment here to get notifications for updates. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi folks, I have the same issue too. Thank you in advance for the answer!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I repost my previous comment here:
I noticed the same: curl https://bitbucket.org/site/ssh" is returning a different format. Go to the site using the browser and copy the content into ~./ssh/known_hosts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello all,
The warning message you are receiving is likely related to old entries on your known_hosts file that are pointing to the bitbucket IP, instead of the domain name bitbucket.org.
To resolve this issue, you can remove the older entries and store the new ones using the following command :
ssh-keygen -R bitbucket.org && sed -i.old -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/d' ~/.ssh/known_hosts && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts
This is also covered in our Bitbucket Cloud SSH rotation FAQ
Thank you!
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patrick, I've done that already. But this command didn't add the new key:
josir@casa2:~$ ssh git@bitbucket.org host_key_info
You are using host key with fingerprint:
ecdsa-sha2-nistp256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0
See https://bitbucket.org/blog/ssh-host-key-changes for more details.
It's better than the published on blog because it removes the duplicated lines but it didn't add the new host key.
I created a support ticket for that:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot see the ticket. Is is private?
I also noticed that https://bitbucket.org/site/ssh doesn't show the same RSA key as https://bitbucket.org/blog/ssh-host-key-changes, probably because the former is the current one and the latter shows the new RSA key after the rotation in June 20 (this means if you added it before, it will cease to work after the rotation date; but you should switch to ECDSA/ED25519 anyway).
I'll probably just add those 2 keys manually, then see if I also get a warning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@josir's original suggestion worked for me, thank you!
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.