To trouble shoot this issue, first get into the server from the Hardware node so that you can quickly resolve this issue as a VPS Administrator.
You might face few issues which I have reported in my earlier posts :
Unable to open pty: No such file or directory
tty device is not owned by group `tty’
If any of the above fixes doesn’t apply to you, do run the SSH in debug mode ( run sshd with -d -d)
Once this is done, try accessing the server via SSH with -vv options to read the logs at the client end also. The debug information which you get to see on the console might help you identify the root cause.
One more main reason or a bug which I have seen on VPS server is. /dev/null file issue. If you’re having trouble with Ping or SSHD it means by now /dev/null file is a regular file which is not recommended by Linux Operating system standards. You face this issue on the VPS which is running CentOS5 OS template.
To resolve this issue follow the steps given below:
1. remove /dev/null
2. Run the command mknod /dev/null c 1 3
this will create the /dev/null as character device file.
Now SSHD should start normally.
This issue can be taken care while creating the VPS itself on your OpenVZ server. Following commands are executed on the server to create device nodes initially.
#mknod dev/ptmx c 5 2
#mkdir dev/pts
#/sbin/MAKEDEV –d /vz/private/<VEID>/dev ttyp ptyp
#mknod dev/null c 1 3
#mknod dev/urandom c 1 9
Do post the comments if you’re facing any issues with your OpenVZ box or VE’s. I shall help you resolving the issue.
October 9th, 2008 at 8:15 am
Hello Shiv,
Really Thanks for posting this in your blog. This fixing was very much required, as yesterday it was a disaster for me waiting and fixing this issue for more than 3 hours
Thanks
October 28th, 2008 at 6:58 pm
I even found the following error in /var/log/secure for which above post gives the solution
Oct 28 13:35:15 server sshd[9600]: fatal: daemon() failed: No such device