You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

SSH Fails with error "Authentication Refused: Bad Ownership Or Modes For Directory /home/****"

edited Jun 30, 2022 1:52PM in Linux

SSH connections to a linux instance fail for a user with "authentication refused: bad ownership or modes for directory" errors. This is caused by incorrect permissions being set on the user's home directory or their authorized_keys file.

A user tries to login via ssh to a Linux OCI Instance, but the login attempt fails with the error:

login as: <username>

Server refused our key

The /var/log/secure log files on the Linux instance also contain the following errors:

21:13:36 <SERVER> sshd[6245]: Authentication refused: bad ownership or modes for directory /home/<USERNAME>

This issue is caused by incorrect permissions on the user's home directory or their .ssh/authorized_keys file.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!