Lost your two-factor phone: sign in without the code
On this page
With two-factor sign-in on, the login asks for a 6-digit code after your password. Without the phone, use one of the 10 recovery codes you saved when you turned it on. Without those, an administrator turns two-factor sign-in off for your login from the server.
Symptoms
- After the password, the Verification page asks for an Authentication code and you do not have the app.
- The code from the app is refused every time.
Causes
- The phone was lost, reset or replaced without moving the authenticator app.
- The phone's clock is wrong — codes are valid for 30 seconds and depend on the exact time.
- You use the entry of another login in the app (several servers or accounts).
Fix
Use a recovery code
- On the Verification page, type one of your recovery codes into Authentication code.
- Click Verify.
Each recovery code works once. After signing in, open Two-Factor Auth, click Disable, then set it up again with the new phone (Enable two-factor authentication) and save the new recovery codes. To get new codes without changing the phone, enter your current password and click Generate new codes.
Fix the phone's clock
Set the phone to take its date and time from the network automatically, then try a fresh code.
No phone and no recovery codes
- Customers and resellers: ask your hosting provider (or the administrator) to turn two-factor sign-in off for your username.
- Administrators do this on the server as root:
sahaab 2fa:disable usernameThe command answers
Two-factor authentication disabled for username. Sign in with the passwordonly, then turn it on again under Two-Factor Auth with the new phone.
Good to know
- Keep the recovery codes outside the phone: in a password manager or on paper.
- Authenticator apps that sync to the cloud (for example 1Password or Authy) move the codes to a new phone by themselves.
Still not working?
If the password is refused before the code is asked, see Cannot log in to the control panel.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- Cannot log in to the control panel or admin panel
Fix "Invalid username or password", "Your IP is temporarily blocked" and "This account is suspended" when signing in to the control panel or the admin panel.
- Forgot the admin password: reset it from the server
Locked out of the admin panel? Reset the administrator password with one command on the server as root, and clear two-factor sign-in or the IP list if needed.
- My IP is blocked: too many failed logins (how to unblock)
Your address was blocked after failed logins or by the Protection Shield and the panel, site, email or SSH stopped working. Find and lift the block.