Error : Unable to open pty: No such file or directory
unable to enter into VPS
You may get an error while entering to a openvz vps. You cant also ssh to the vps from outside.
Error:
vzctl enter xxxx
enter into VE xxxx failed
Unable to open pty: No such file or directory
1. If it is a redhat based system such as CentOS,
The solution is :
vzctl exec VEID /sbin/MAKEDEV pty
vzctl exec VEID /sbin/MAKEDEV tty
vzctl enter VEID
To fix this issue permanently
Edit the file /etc/rc.sysinit of the VPS
Comment the line :
/sbin/start_udev  to
#/sbin/start_udev
Add the following lines after /sbin/start_udev:
/sbin/MAKEDEV tty
/sbin/MAKEDEV pty
2. If it is a Debian system
vzctl exec veid update-rc.d -f udev remove
vzctl restart veid