由于/var/lib目录权限导致SSH不能用
上午一同事说一台服务器SSH登录不了了。
一开始以为是ssh服务没启动,执行service sshd status.
linux-34:/var/lib # service sshd status
Checking for service sshd running
linux-34:/var/lib # service sshd restart
Shutting down SSH daemon done
Starting SSH daemon/var/lib/empty must be owned by root and not group or world-writable.
startproc: exit status of parent of /usr/sbin/sshd: 255
后来上网查了发现可能是文件权限设置问题。 231
linux-34:/var/lib # ls -ld /var/lib/empty
drwxrwxrwx 2 root root 4096 Jun 16 2006 /var/lib/empty
于是将权限修改为755
chmod 755 /var/lib/empty
然后再重启下,这下重启成功了。
linux-34:/var/lib # service sshd restart
Shutting down SSH daemon done
Starting SSH daemon done
linux-34:/var/lib # service sshd status
Checking for service sshd running
最后用SecureCRT登录,OK,问题解决!
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15663454/viewspace-1056469/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15663454/viewspace-1056469/