What Do I Do If "Authentication refused: bad ownership or modes for directory /root" Is Displayed and I Can't Log In to an ECS Using SSH Key?
Symptom
You cannot log in to an ECS using an SSH key, and the error message "Authentication refused: bad ownership or modes for directory /root" is displayed.
Probable Causes
Error information in logs indicates that the permission of the /root directory is incorrect. Check the permission, owner, and owner group of the /root directory, .ssh in the /root directory, and authorized_keys in the .ssh directory.
Solution
Change the owner, owner group, and permission of the /root directory to recover the SSH.
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