Solve Bitbucket SSH-RSA connection issue

How to solve permission denied or no mutual signature algorithm errors while connecting to Bitbucket.

SNP 016 #156 Filed git bitbucket ssh

Because of the deprecation of the RSA algorithm you could receive messages like these when you try to access your repository:

  • no matching host key type found
  • Permission denied (publickey)
  • fatal: Could not read from remote repository.
  • no mutual signature algorithm

To test your connection you can use:

shell
ssh -Tv git@bitbucket.org

For a workaround you can re-enable the SSH-RSA support by addig this to the SSH config file (usually in ~/.ssh/config):

shell
PubkeyAcceptedKeyTypes +ssh-rsa

But as it is no longer considered safe to use these keys, you should consider generating a new one with:

shell
ssh-keygen -t ed25519 -C "address@example.com"