SOLVED Two Factor Authentication Invalid Code Error

Jor1dan

Registered
Mar 21, 2019
3
2
1
Amman
cPanel Access Level
Root Administrator
I have a problem
before 1 month u set a Two Factor Authentication using my android phone

now i can not enter to my server
1) i forget my ssh port ( so i can not log in via ssh )
2) i can not log in to whm coz the Two Factor Authentication not work i enter the 6 digit many times but still not working

this problem start when i update the cpanel to latest version

so any geek here have a solution's for this ( my server from hetzner )
its un-managed ( root server )

:(
 

Attachments

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
9,005
762
263
Houston
cPanel Access Level
DataCenter Provider

LucasRolff

Well-Known Member
May 27, 2013
128
74
28
cPanel Access Level
Root Administrator
You have 3 additional options as well:
- nmap your IP to find the SSH port
- boot the server into rescue mode
- ask Hetzner to connect a Lantronix Spider KVM to your machine (it's free)
 
  • Like
Reactions: cPanelLauren

Jor1dan

Registered
Mar 21, 2019
3
2
1
Amman
cPanel Access Level
Root Administrator
Hi @Jor1dan


You could disable 2FA with the API here: WHM API 1 Functions - twofactorauth_disable_policy - Developer Documentation - cPanel Documentation but you would need to be able to access the server via SSH. My assumption is that hetzner should be able to provide you with your server's settings such as the SSH port, they also provide a portal to manage your server which could be utilized to obtain this information.
ok now i have access to ssh ( i change the port from rescu system )
i will do this
 
  • Like
Reactions: cPanelLauren

Jor1dan

Registered
Mar 21, 2019
3
2
1
Amman
cPanel Access Level
Root Administrator
  • Like
Reactions: cPanelLauren

chiareu

Member
Feb 8, 2016
14
0
1
Bucharest
cPanel Access Level
Root Administrator
that is only a solution to login to your server. Do not resolve the issue WHM updater has.
After every WHM update my time zone are wrong and obvious my 2FA not working.

Need to ask for KVM after any WHM update, and for that kind of "features" WHM want more money with the new license plan.

I serious consider to migrate.
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
9,005
762
263
Houston
cPanel Access Level
DataCenter Provider
@chiareu

It sounds like there is a misconfiguration on your server, as this is not the normal or intended behavior. I'd suggest opening a ticket using the link in my signature so that we can take a look at the configuration of the server. If you do choose to open a ticket please update here with the Ticket ID so that we can update this thread with the outcome.

Thanks!