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

Update Bitbucket Cloud SSH Host Keys (replace current RSA and remove DSA host key) and TortoiseGit

yuri-s
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!
May 21, 2023

I try the following command:
$ ssh git@bitbucket.org host_key_info

and receive:
git@bitbucket.org: Permission denied (publickey).

instead of the
You are using host key with fingerprint: ssh-ed25519 SHA256:ybgmFkzwOSotHTHLJgHO0QN8L0xErw6vd0VhFA9m3SM See https://bitbucket.org/blog/ssh-host-key-changes for more details.

acording to this explanations:
ACTION REQUIRED: Update your Bitbucket Cloud SSH Host Keys - Bitbucket

Thank you


2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2023
Hi @yuri-s and welcome to the community!
The instructions we have on the blog are for OpenSSH (or compatible) clients. You mentioned TortoiseGit in the title of your post, and I see that TortoiseGit uses TortoiseGitPlink by default as SSH client:
You first need to figure out which SSH client is configured in TortoiseGit. Is it TortoiseGitPlink, PuTTY, OpenSSH, or a different one?
In case you are using PuTTY: PuTTY in Windows does not use the ~/.ssh/known_hosts file, but stores the known hosts in the Windows Registry. Please look at the following FAQ, the questions related to PuTTY and SourceTree for Windows for instructions on how to update the known hosts on PuTTY:
In case you are using TortoiseGitPlink, you should consult its documentation on how to update its configuration.
If you are using OpenSSH, you can create a file named config in your ~/.ssh folder and add the following lines (if the file exists, just add the following content)
Host bitbucket.org
        AddKeysToAgent yes
        IdentityFile ~/.ssh/id_rsa
where ~/.ssh/id_rsa replace with the path and name of the private SSH key, whose public key you have uploaded to Bitbucket. Afterwards, try the command ssh git@bitbucket.org host_key_info one more time. The error you receive means that your client cannot authenticate to Bitbucket, possibly because your key may not be offered, and a config may help in this case.
Please feel free to reach out if you have any questions.
Kind regards,
Theodora
0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2023

What is the question?

In the article you linked there is an explanation why the key change is necessary, and Atlassian even provide the steps to make it happen. I followed their guide and it worked perfectly (on Linux).

Suggest an answer

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

Atlassian Community Events