The place where random ideas get written down and lost in time.

2023-06-17 - BitBucket SSH Host Key Migration

Category DEV

What: https://bitbucket.org/blog/ssh-host-key-changes

Verify by running this command on each host:

$ ssh git@bitbucket.org host_key_info

> You are using host key with fingerprint:

> ssh-ed25519 SHA256:ybgmFkzwOSotHTHLJgHO0QN8L0xErw6vd0VhFA9m3SM

> ecdsa-sha2-nistp256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0

ECDA or ED25519 are GOOD.

Got “Permission denied”?

https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html

⇒ This should happen for any machine where I did not load an SSH Key in my Bitbucket account.

⇒ If I have an ssh-agent key, load it first.

⇒ If I don’t expect to have ssh auth, then it’s fine. In this case, grep bitbucket ~/.ssh/known_hosts ⇒ vim ~/.ssh/known_hosts and remove any reference to bitbucket).

To accept the new host on a machine that needs git access:

$ ssh-keygen -R bitbucket.org && curl https://bitbucket.org/site/ssh >> ~/.ssh/known_hosts

then rerun the host_key_info cmd, access the key with “yes”, and repeat again to remove any duplicated host entry.


 Generated on 2025-01-18 by Rig4j 0.1-Exp-f2c0035