Server management -
Vps and dedicated
Sunday, 01 March 2009 09:51
Last Updated on Sunday, 01 March 2009 11:53
Written by somer orbay
This issue is very rare but when you install udev in an openvz virtualized vps then you`ll have no longer access to ssh with it.
Thats because openvz is not compatible with udev and it causes pty errors which will prevent you login to ssh.
Solution :
To prevent this from happening add following to /etc/rc.local
/bin/rm -rf /dev/null
/bin/rm -rf /dev/random
/bin/rm -rf /dev/tty*
/bin/rm -rf /dev/pty*
/bin/mknod /dev/null c 1 3
/bin/mknod /dev/random c 1 8
/sbin/MAKEDEV tty
/sbin/MAKEDEV pty
Thanks to Pierre at vpslink.
What happens if you already installed the udev in your vps and made your vps inoperable ?
My solution :
To fix that ugly (ssh refused to allocate pty) error go to hypervm and click fix centos dev, this will render a fresh /dev for you and you`ll be able to ssh into your server until you reboot your vps.
To fix this issue permanently issue these two commands at ssh when you have got access with "fix centos dev" via hypervm
chmod -x /sbin/udevd
chmod -x /sbin/udevd.static
Be advised, you may only chmod /sbin/udevd because openvz uses static.
Good Luck.