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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting "That access key is invalid." when adding an SSH key

I'm following the instructions for adding a new SSH key to my repo but no matter what I do I keep getting the error: "That access key is invalid."

2 answers

1 accepted

1 vote
Answer accepted

Hello @Darrell Brogdon,

Thanks for reaching out.

Aren't you trying to register your private key by any chance, not the public one? You'll get this error if you try adding your private key. You should be adding the corresponding public key to Bitbucket.

Bitbucket supports four encryption algorithms for SSH keys: Ed25519, ECDSA, RSA, and DSA. The message you mentioned generally means that your key isn't using one of these algorithms or is malformed.

Hope this helps.


jredmond Atlassian Team Dec 09, 2019

The key may also be in an unrecognized format, or it may be the wrong size (RSA keys must be at least 2048 bits; ECDSA must be 256, 384, or 521 bits; and DSA must be 1024 bits but don't use that because it's quite insecure).

Like # people like this

Did you solve this problem successfuly @Darrell Brogdon ? 

I pasted the data below to the textbox  (some letters replaced with XXX)


This was generated with Putty Agent, RSA 2048 bits. I put the word ssh-rsa at the top. The key name is @"20202_XXXLaptopDevMachine". Same error @"That access key is invalid."


@jredmond @Daniil Penkin 

Hello @freelensia,

I put the word ssh-rsa at the top

I'm not sure what you meant here. The public key should be a single line, like this:

ssh-rsa <encoded key> <optionally, your email>

It's hard to tell what is wrong with your key given that you replaced some letters there, so I can't validate it. It is actually safe to publish your public key – that's why it is called public. What you should never share is your corresponding private key.

The safest option is just to find the key file on your disk, open it with a text editor and copy the content.

Hope this helps.


Thanks @Daniil Penkin , the problem was that I tried to copy the key from a text editor. This was not accepted by Bitbucket. I needed to load the key via PuttyGen Agent then copy the text generated there. This was not mentioned in the guide at

Thanks for offering to help.

Like zukrac likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,736 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you