Bitbucket: "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
ssh refuses to connect because the host key Bitbucket's server just presented is not the one saved for that name in your known_hosts file. Do not delete the file and move on: first compare the fingerprint in the warning with the ones Atlassian publishes (below). If it matches, remove the old entry for that host with ssh-keygen -R and connect again. If it does not match, stop and ask who runs the network you are on.
What it looks like
OpenSSH 10.2 on a test computer, with a wrong key saved for bitbucket.org (other versions word the lines a little differently):
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:ybgmFkzwOSotHTHLJgHO0QN8L0xErw6vd0VhFA9m3SM. Offending ED25519 key in /home/<you>/.ssh/known_hosts:1 Host key for bitbucket.org has changed and you have requested strict checking. Host key verification failed.
The line "Offending ED25519 key in …:1" names the file and the line number. git then ends with fatal: Could not read from remote repository. This is not "Permission denied (publickey)" (that one is about your key): ssh stopped before it offered any key.
The warning is about SSH, which the review inbox does not use: Pull Request Inbox for Bitbucket, a plugin for JetBrains IDEs, reads pull requests through Bitbucket's HTTPS API, so only your Git pull and push over SSH are stopped.
1. Compare the fingerprint
Atlassian lists the host key fingerprints of Bitbucket Cloud on its page Configure SSH and two-step verification. On November 22, 2026 they were the same for bitbucket.org and ssh.bitbucket.org (checked by running ssh-keygen -lf on https://bitbucket.org/site/ssh):
SHA256:ybgmFkzwOSotHTHLJgHO0QN8L0xErw6vd0VhFA9m3SM (ED25519) SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0 (ECDSA) SHA256:46OSHA1Rmj8E8ERTC6xkNcmGOw9oFxYr0WF6zWW8l1E (RSA)
The warning shows the type (ED25519, ECDSA or RSA) and the fingerprint that was received. If it is the one in the list for that type, Bitbucket is answering correctly and your saved entry is the old or wrong one. If it is not, do not connect: a proxy or another network device may be answering in Bitbucket's place. A short-lived case is described in an Atlassian Community thread of June 2026, where members reported the warning for bitbucket.org for a while and advised checking the fingerprint against Atlassian's list before accepting.
2. Remove the old entry, only for this host
The same command works in PowerShell, Command Prompt, Git Bash, macOS and Linux (ssh-keygen comes with Windows' OpenSSH client and with Git for Windows). It removes every key saved for the host name, and changes nothing for other hosts:
ssh-keygen -R bitbucket.org ssh-keygen -R ssh.bitbucket.org
To see first what is saved, ssh-keygen -F bitbucket.org lists the entries. The file is ~/.ssh/known_hosts (%USERPROFILE%\.ssh\known_hosts on Windows); -R keeps a copy as known_hosts.old.
3. Connect again and check what ssh shows
ssh -T git@ssh.bitbucket.org
ssh asks whether to continue and prints the fingerprint again. Answer yes only when it is one from the list above. Where nobody can answer, as in CI, add Bitbucket's published lines instead:
curl -s https://bitbucket.org/site/ssh | grep '^ssh\.bitbucket\.org ' >> ~/.ssh/known_hosts ssh-keygen -lf ~/.ssh/known_hosts
(In Git Bash on Windows, the same lines work. The second command prints the fingerprints to compare. For the host name move itself, see Bitbucket SSH traffic moves to ssh.bitbucket.org.)
If it is your own Bitbucket Data Center
The server's host key changes when the server is rebuilt or moved, or when it is another machine behind the same name. Atlassian's article REMOTE HOST IDENTIFICATION HAS CHANGED when accessing Bitbucket Server git repo over ssh names another cause: OpenSSH clients older than 4.4 cannot tell apart ssh servers running on the same machine; it says to upgrade the client to 4.4 or newer and remove all entries for that machine from known_hosts. Get the fingerprint from whoever administers the server before you accept it.
In the IDE
Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pull requests that wait for your review through Bitbucket's HTTPS API, so a host key warning does not affect it. It reads the repository from your Git remote, including ssh:// and git@ remotes, but it never opens an SSH connection. Git's pull and push in the IDE run the Git and SSH on your computer, so the steps above are the fix there. The review inbox, diffs and discussions are free; approving, commenting and merging are Pro, with a 30-day trial.
Get it on JetBrains Marketplace
Sources
- Configure SSH and two-step verification (Atlassian, host key fingerprints)
- REMOTE HOST IDENTIFICATION HAS CHANGED when accessing Bitbucket Server git repo over ssh (Atlassian)
- ssh-keygen(1) (OpenBSD manual: -R, -F, -l)
- SSH host key rotated on 2026/06/02? (Atlassian Community discussion)
Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.
More: Bitbucket is moving SSH traffic to ssh.bitbucket.org · "Permission denied (publickey)" · "access via a deployment key is read-only" · 日本語