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

How can i get recovery code of bitbucket using SSH keys ?


I lost "Authy App" due to which i am not be able to signin to bitbucket .
Also i forget to save my recovery codes.
But i have my ssh keys.

and my account is login with Google.
Can you help me, how can i recover my bitbucket account ?

i tried these steps:

I have ssh keys, And i also tried to recover my Bitbucket account using SSH keys.

→ Link:


When i execute this command: “ssh recovery_codes“. Output:“Because your Atlassian account admin requires single sign-on, you’ll need to authenticate with an app password. Create an app password “

And then i tried to add my SSH keys to agent using this command: “ssh-add -K ~/.ssh/id_rsa”output: “Identity added: /Users/<mac-name>/.ssh/id_rsa (/Users/<mac-name>/.ssh/id_rsa)”

then tried again accessing for the recovery codes, but still same output as mentioned above.


2 answers

Reset the password with this link

Then finally this

ssh recovery_codes

Would not work since you need recovery code to reset the password

It did work for me and many people I know. Did you try the link ?

Resetting the atlassian password and then using that to recover codes worked for me.

This link is for resetting the bitbucket password

0 votes
Ana Retamal Atlassian Team Apr 26, 2019

Hi Muhammad, welcome to the Community.

That's great that you have your SSH keys! That way you'll be able to obtain 6 new recovery codes that you can use to access your account again and set your new device for authentication. 

To obtain the codes, please enter the following in the command line of the computer where you're using your SSH key:

ssh recovery_codes

This will bring out 6 recovery codes (one time use only) that you can use to get in. This is explained at Two-step verification.

Let us know if you need anything else.

Best regards,


I have execute this command 

ssh recovery_codes

 but output is: 

Bitbucket two-step recovery codes
"If you don't use a password to log in you'll need to contact support to recover your account:
Enter Bitbucket password (Warning: password displays when entered): -------

Because your Atlassian account admin requires single sign-on, you'll need to authenticate with an app password. Create an app password at"

and when i click on provided link, it will redirect me to "Enter Verification Code".

Like aneez-paytm likes this

Use Authy app to get recovery code, I have installed this app and totally forgot about this. Luckily I was able to get my recovery codes from this app and able to login back to my BB account, thanks

@Ana Retamal I'm having this exact same problem. I do not have a password since I use SSO. Is there anyway to enter a password using SSO?

@mjoshi I think a large part of the problem is that neither myself or @arij.siddiqui have access to the original 2FA application. I use Google Authenticator (Not Authy) and it is on my old phone that I have traded in. 

Thank you,


Like - 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,749 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