Sunday, 5 February 2012

Unable to start SSH: Restarting Secure Shell server: sshd failed! /dev/null is not a character device!.

root@amaziah [~]# /etc/init.d/sshd restart

Restarting Secure Shell server: sshd failed!
/dev/null is not a character device!.

The /dev/null should be a character device as per the Linux standards. This error occurs when /dev/null turns into a regular file.

To fix this issue, firstly delete /dev/null file.

root@amaziah [~]# rm -f /dev/null


And create the character device

root@amaziah [~]# mknod /dev/null c 1 3

root@amaziah [~]# ls -la /dev/null  , the output should look like

crw-rw-rw- 1 root root 1, 3 Oct  1 11:42 /dev/null


Now restart the sshd service

root@amaziah [~]# /etc/init.d/sshd restart

Stopping sshd:              [  OK  ]

Starting sshd:              [  OK  ]




Fixed.........  :)


No comments:

Post a Comment