ssh Key Authentication refused bad ownership or modes for directory

Authentication refused: bad ownership or modes for directory

Dec 23 15:00:00 tabak sshd[26982]: Authentication refused: bad ownership or modes for directory /chroot/home/fin_user
Dec 23 15:00:06 tabak sshd[26985]: Connection closed by 172.31.1.54

If you get this error in your logs when trying to setup public key authenticated automatic logins, the problem is a permissions one.

You’ll need to perform the following commands on the user account you are trying to setup:

<font face="Courier New">chmod go-w </font><font face="Courier New">/chroot/home/fin_user chmod 700 </font><font face="Courier New">/chroot/home/fin_user</font><font face="Courier New">/.ssh chmod 600 </font><font face="Courier New">/chroot/home/fin_user</font><font face="Courier New">/.ssh/authorized_keys</font>

About these ads

About this entry