SSH Fails with error "Authentication Refused: Bad Ownership Or Modes For Directory /home/****"
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.
Tagged:
0