Disable Two Factor Authentication with SSH from rescue system
Need instructions how to disable 2FA via SSH from linux rescue system.
-
Got stuck after trying: mv -v /var/cpanel/authn/twofactor_auth/tfa_userdata.json{,.bak}; echo "{}" >> /var/cpanel/authn/twofactor_auth/tfa_userdata.json
Now have a problem: Internal Server Error 500 Security Policy requires exec termination.0 -
This thread should be helpful for your original issue: Two-Factor Authentication 0 -
This thread should be helpful for your original issue: Two-Factor Authentication
I know about api but can api be called if rescue system is booted?0 -
I know about api but can api be called if rescue system is booted?
Hello, Two-factor authentication should not prevent you from accessing the server via SSH as root. Once the server is booted out of rescue mode, you'd simply access the server via SSH as root and run those WHM API 1 commands. Thank you.0 -
Firewall is preventing me from accesing, is it possible to disable 2FA from rescue mode? 0 -
Hello, It's unlikely that command will work while the server is booted in rescue mode, but it depends on the OS and the specific boot options you used. You may want to check with your hosting provider to see if they provide an option to disable the firewall rules so you can access the server via SSH. Thank you. 0 -
Think local whm or csf is blocking ssh access, can you maybe instruct how to dissable csf from rescue mode? 0 -
New Think local whm or csf is blocking ssh access, can you maybe instruct how to dissable csf from rescue mode?
You may find this third-party URL helpful: How to edit /etc/sysconfig/iptables from: RESCUE MODE boot? However, running an incorrect command could lead to data loss so it's generally advised to consult with a qualified system administrator or your hosting provider if you are not comfortable in rescue mode. Thank you.0 -
Solved by disabling CSF adding file csf.disable to csf folder. touch /etc/csf/csf.disable
After reboot managed to SSH login and disable 2FA with whmapi1whmapi1 twofactorauth_disable_policy
0
Please sign in to leave a comment.
Comments
9 comments