How Do I Disable Login to an ECS Using SSH Password?
Scenarios
To ensure ECS security, you need to change the access key of an ECS regularly, or disable the SSH password login.
This section describes how to disable the SSH password authentication.
After disabling SSH password login, you can still log in to the ECS using the password on the ECS console. Keep your password secure.
Procedure
- Log in to Linux ECS and run the following command to edit the SSH connection:
vi /etc/ssh/sshd_config
Modify the following item:
Change the value of PasswordAuthentication from yes to no.
- Restart sshd for the modification to take effect.
- Restart the ECS.
- Log in to the Linux ECS using an SSH password.
For details, see Remotely Logging In to a Linux ECS (Using an SSH Password).
If the login fails, the login to an ECS using an SSH password is disabled.
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