全球主机交流论坛

标题: stdin: is not a tty error / Server refused to allocate pty [打印本页]

作者: cnx    时间: 2009-10-22 21:55
标题: stdin: is not a tty error / Server refused to allocate pty
This error is caused by an update with CentOS on OpenVZ nodes.

To fix, we need to login using WinSCP (http://winscp.net/)
Once logged in we need to open a terminal.
In the Terminal, type:

/sbin/MAKEDEV pty
/sbin/MAKEDEV tty
Now you can exit WinSCP and you will be able to login via SSH again.

When your VPS is restarted, the error will return so to fix this I have came up with a hotfix.
In SSH, type:

yum install -y nano

nano /etc/init.d/sshd
At the top of the file, anywhere after "#!/bin/bash", add

/sbin/MAKEDEV pty
/sbin/MAKEDEV tty

Press Ctrl+x
Type Y
Press Return
Now i hope this has fixed your problem.
作者: cpuer    时间: 2009-10-22 22:11
标题: 回复 1# 的帖子
升级CentOS会出现这种问题?
作者: cnx    时间: 2009-10-22 22:13
是的,之前我安装桌面时就出现过,登陆不了SSH.
作者: cpuer    时间: 2009-10-22 22:47
标题: 回复 3# 的帖子
重启下系统是否可以恢复正常?
作者: pigicoffee    时间: 2009-10-22 23:46
重启下米用
作者: cpuer    时间: 2009-10-22 23:48
标题: 回复 5# 的帖子
额,那就得用楼主的办法来解决了。




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4