passwordless ssh not working on rhel5

Was doing automation test, trying to set up passwordless ssh between the dirver and couple of test nodes. it just didn't work with one rhel5 box. Finally find the solution:

[root@perlrh5-179 .ssh]# tail -n 10 /var/log/secure
Dec 4 12:39:56 perlrh5-179 sshd[9397]: Authentication refused: bad ownership or modes for directory /root
Dec 4 12:39:59 perlrh5-179 sshd[9398]: Connection closed by 10.200.58.179
...

log shows the issue was the permission of the root dir

drwxrwxr-x 20 root root 4096 Nov 25 10:08 root

change it to 700 and the issue was resolved.

Leave a comment

About Michael Li

user-pic I blog issues resolved at work