Got a new phone 2FA did not back up

Got a new phone and now i dont have the 2FA on my phone. Probably a rookie move.

The conclusion ive come to is that i have to either start from scratch and use my recovery seeds, possibly losing my lightning channels, although i have done backups.

Came across this: SSH Alternatively, if you really just want to kill 2fa and start over, if you can ssh in, this command will delete 2fa (it deletes a otpURI parameter in user.json which stores your 2fa): json_file="/home/umbrel/umbrel/db/user.json" && contents="$(jq ‘del(.otpUri)’ ${json_file})" && echo “${contents}” > ${json_file}

  • would like to SSH in but do not know how to do this.
    what would be the best way to go about getting back into my node.

Would love some help thanks

1 Like

This is a great question. Even if a cell phone dies suddenly, I can see this become a problem.

Open up powershell or terminal, type in ssh -t umbrel@umbrel.local
You’ll have to login with your dashboard password (you won’t see anything as you type, but that’s normal). It’ll then bring you into the command prompt to type in that command

Got to the part where I entered the pword.
it goes to umbrel@umbrel: ~$
do i just copy and paste this entire command… (i am not trained in code, but can figure out relatively simple things)
json_file="/home/umbrel/umbrel/db/user.json" && contents="$(jq ‘del(.otpUri)’ ${json_file})" && echo “${contents}” > ${json_file}

is there anything else after i have to do?

follow up this is what resulted
-bash: command substitution: line 2: syntax error near unexpected token `(’

-bash: command substitution: line 2: `jq ‘del(.otpUri)’ ${json_file})"’

can you check this command? it did not work on terminal

1 Like

following…

umbrel@umbrel: ~$

is there something im supposed to put before it?

Hey Scooterson, you’re in the right place, though I’m not sure why the command isn’t working, seems like it may not have been pasted in correctly.

There’s a manual way to do this, which might be a little scarier, but does basically the same thing.

After you ssh in

cd umbre/db

then type

nano user.db

You should see a line in there towards the bottom that looks something like
"otpURI": "some really long string of letters and numbers"

You’ll want to delete everything between that second set of quotations - that really long string of letters and numbers. That will disable 2FA.

To exit, press ctrl-x
It’ll ask you if you want to save modified buffer, press “y” for yes
Then just press enter again if it asks you what name to save as

Refresh your dashboard at that point and 2fa should be gone.

Thanks, wasnt too scary, but after doing that nothing was on the screen where otpURI was expected. Im not sure but the password for me to get into ssh is no longer my own password, i can only log into it with moneyprintergobrrr now and im not sure if that is causing there to be nothing showing up.

Ah, sorry, I made a typo - I meant user.json, not user.db.

Jonsyu, This is so helpful. However when I make the changes to the json file it says :It says error writing user json : permission denied. How to I allow permissions to update and the change? Thank you!

Disregard, I figured out you need to use the cmnd sudo.

Hello how do I use command sudo, I’m stuck I lost my 2fa

Do you know how to get back into node

Thanks

Gary