全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2315|回复: 5
打印 上一主题 下一主题

stdin: is not a tty error / Server refused to allocate pty

[复制链接]
跳转到指定楼层
1#
发表于 2009-10-22 21:55:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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.
2#
发表于 2009-10-22 22:11:54 | 只看该作者

回复 1# 的帖子

升级CentOS会出现这种问题?
3#
 楼主| 发表于 2009-10-22 22:13:41 | 只看该作者
是的,之前我安装桌面时就出现过,登陆不了SSH.
4#
发表于 2009-10-22 22:47:33 | 只看该作者

回复 3# 的帖子

重启下系统是否可以恢复正常?
5#
发表于 2009-10-22 23:46:17 | 只看该作者
重启下米用
6#
发表于 2009-10-22 23:48:38 | 只看该作者

回复 5# 的帖子

额,那就得用楼主的办法来解决了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-10-29 00:04 , Processed in 0.093766 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表