Why Can't I Receive a Verification Code After 2FA Is Enabled?
- The two-factor authentication function does not take effect immediately after being enabled.
- To enable two-factor authentication, you need to disable the SELinux firewall.
Disable the SELinux firewall and try again.
- Linux servers require user passwords for login.
To switch from the key login mode to password login mode, perform the following steps:
- Use the key to log in to the Linux ECS and set the password of user root.
sudo passwd root
If the key file is lost or damaged, reset the password of user root.
- Modify the SSH configuration file on the ECS as user root.
su root
vi /etc/ssh/sshd_config
Modify the following settings:
- Change PasswordAuthentication no to PasswordAuthentication yes.
Alternatively, delete the comment tag (#) before PasswordAuthentication yes.
- Change PermitRootLogin no to PermitRootLogin yes.
Alternatively, delete the comment tag (#) before PermitRootLogin yes.
- Change PasswordAuthentication no to PasswordAuthentication yes.
- Restart sshd for the modification to take effect.
- Restart the ECS. Then, you can log in to the ECS as user root using the password.
To prevent unauthorized users from using the key file to access the Linux ECS, delete the /root/.ssh/authorized_keys file or clear the authorized_keys file.
- Use the key to log in to the Linux ECS and set the password of user root.
Security Configurations FAQs
- How Do I Clear the SSH Login IP Address Whitelist Configured in HSS?
- What Can I Do If I Cannot Remotely Log In to a Server via SSH?
- How Do I Use 2FA?
- What Do I Do If I Cannot Enable 2FA?
- Why Can't I Receive a Verification Code After 2FA Is Enabled?
- Why Does My Login Fail After I Enable 2FA?
- How Do I Add a Mobile Phone Number or Email Address for Receiving 2FA Verification Notifications?
- If I Choose to Use Verification Code for 2FA, How Do I Get the Code?
- Will I Be Billed for Alarm Notifications and SMS?
- How Do I Modify Alarm Notification Recipients?
- Why No Topics Are Available for Me to Choose When I Configure Alarm Notifications?
- Can I Disable HSS Alarm Notifications?
- How Do I Modify Alarm Notification Items?
- How Do I Disable the SELinux Firewall?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore