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.
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.
Chatbot