The “/dev/null is not a character device” message occurs in a VPS when an upgrade is performed and the /dev/null turns into a regular file.
# /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. To fix the issue, remove the file
# rm -f /dev/null
Create the character device
# mknod /dev/null c 1 3
The file should look like follows:
# ls -la /dev/null crw-rw-rw- 1 root root 1, 3 Oct 1 11:42 /dev/null
Now restart the sshd service
# /etc/init.d/sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ]
Comments are closed.