Friday 10 August 2012

Unable to start sshd

Unable to start sshd
==========

When you try to start sshd it won't start.

[root@server ~]# service sshd restart
Stopping sshd:                                             [FAILED]
Starting sshd:                                             [  OK  ]
[root@server ~]# ssh localhost
ssh: connect to host localhost port 22: Connection refused
[root@server ~]# service sshd restart
Stopping sshd:                                             [FAILED]
Starting sshd:                                             [  OK  ]

Check /var/log/messages. In my case /var/log/messages didn't show any error.

Please check /dev/null file. It should now be a regular file, which is not recommended. Some install script probably replaced the /dev/null with a file of the same name.

Do the following:

rm -rf /dev/null
mknod /dev/null c 1 3

This will create the /dev/null and sshd should start as normal.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.