SSH problem

Tags: , , , ,

I can’t login to the server using SSH and the TELNET service is NOT enable by default. Thanks god, I have DELL DRAC enable, I managed to login using console.

I’m getting an error messages in /var/log/messages and SSH connection refused error on one of my SuSE Linux box as below:

Aug 2 16:20:05 planetmy sshd[22531]: fatal: /var/lib/empty must be owned by root and not group or world-writable.
Aug 20 16:20:06 planetmy sshd[22546]: fatal: /var/lib/empty must be owned by root and not group or world-writable.
Aug 20 16:20:19 planetmy sshd[22797]: fatal: /var/lib/empty must be owned by root and not group or world-writable.
Aug 20 16:20:47 planetmy sshd[22838]: fatal: /var/lib/empty must be owned by root and not group or world-writable.
Aug 20 16:21:37 planetmy sshd[23598]: fatal: /var/lib/empty must be owned by root and not group or world-writable.

I found one of the stupid guy issue chmod 755 command in /var/log/messages:

Aug 20 16:15:37 planetmy sudo: username1 : TTY=pts/63 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/ find ./ -type d -exec chmod 775 {}

Basically he try to changed all folder with permission 775(rwxrwxr-x) on Linux server.

Looking at man 8 sshd:

/var/lib/empty
chroot(2) directory used by sshd during privilege separation in the pre-authentication phase. The directory should not contain any files and must be owned by root and not group or world- writable.


Change /var/lib/empty permission back to 755 and owned by root, restart SSH services and it’s worked.

# ls -ld /var/lib/empty/
drwxr-xr-x 2 root root 48 Aug 10 2005 /var/lib/empty/

# /etc/init.d/sshd restart

Related post: SSH Trick

Possibly Related Posts:


Leave a Reply