Solve Bitbucket SSH-RSA connection issue

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

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:

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

PubkeyAcceptedKeyTypes +ssh-rsa

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

ssh-keygen -t ed25519 -C "[email protected]"