PTY allocation request failed on channel 0
20/02/2009Yesterday, I was trying to login to my machine and I got the following message:
PTY allocation request failed on channel 0
My prompt was stuck and I could not enter commands. This happened because -for some reason- the tty related devices(/dev/ptmx, /dev/pts) were not created or mounted on my machine. In order to get this problem resolved, I created and mounted the missing devices using the following commands:
rm -rf /dev/ptmx mknod /dev/ptmx c 5 2 chmod 666 /dev/ptmx umount /dev/pts rm -rf /dev/pts mkdir /dev/pts mount /dev/pts
In order to be able to execute commands you will have to login to your machine(isn’t this supposed to be the original problem :) ).
This will do the trick:
ssh user@host "/bin/bash -i"
My VPS is built on openVZ but I have seen this problem occur also in XEN machines.
Leave me a comment if this works for you!
There are 18 comments in this article: