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

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

arij.siddiqui April 25, 2019

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: https://confluence.atlassian.com/bitbucket/two-step-verification-777023203.html?_ga=2.170468384.1643256017.1556089847-1526224153.1556089847#Two-stepverification-RetrievearecoverycodethroughSSH

Steps:

When i execute this command: “ssh git@bitbucket.org 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

0 votes
aneez-paytm February 15, 2020

Reset the password with this link

https://bitbucket.org/account/password/reset/?_ga=2.151298617.1860727660.1566931470-162300141.1566931470

Then finally this

ssh git@bitbucket.org recovery_codes
rimple.singh June 2, 2020

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

aneez-paytm June 2, 2020

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

rimple.singh June 3, 2020

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

aneez-paytm June 3, 2020

This link is for resetting the bitbucket password

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 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 git@bitbucket.org 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,

Ana

arij.siddiqui April 26, 2019

I have execute this command 

ssh git@bitbucket.org 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: https://support.atlassian.com/bitbucket-cloud/
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 https://bitbucket.org/account/admin/app-passwords"

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

Like aneez-paytm likes this
mjoshi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 12, 2019

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

Sam Bigelow
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 24, 2019

@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,

Sam

Like - likes this
François Granade November 2, 2021

Hum, when I request the recovery_codes, they comeback empty :

~ % ssh git@bitbucket.org recovery_codes

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: https://support.atlassian.com/bitbucket-cloud/

Enter Bitbucket password (Warning: password displays when entered): XXX-XXX-XXX-XXXX

 

Your single-use recovery codes are

 

Once logged in, you should immediately visit

https://bitbucket.org/account/user/xxxxxxx/two-step-verification/

to add a new two-step device.

 

Thank you for using Atlassian Bitbucket.

~ % 


There is nothing after the  "Your single-use recovery codes are" ? -- Any idea ?

Bermon Clément
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2022

Same issue here: no code after the line

Your single-use recovery codes are
Like Admir Husić likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events