PTY allocation request failed on channel 0

Archlinux 真是不能做服务器,升一次级就要死一次,你们三天两头倒腾包的布局/命名有啥意思呢?

这次OpenVZ的用户倒了大霉,升级 udev 以后,ssh 进不去,提示:PTY allocation request failed on channel 0。

这下傻眼了,ssh 进不去这不完了蛋了,修都没法修。

Google 了一下,有个大叔已经研究出了怎么修复,用 `ssh user@dongsheng.org ‘/bin/bash -i’` 进去,重新挂载 /dev/pts 即可,但这个办法治标不治本,系统重启就又回到原点。在 /etc/rc.d 里放个脚本就行了:

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

文件名存为 /etc/rc.d/udevfix,然后在 /etc/rc.conf 的 DEAMON 中加入 udevfix 即可。

据悉,这个问题是由于 OpenVZ 的模板与 udev 不兼容导致的。

升级 Archlinux 要谨慎啊!!

Credits:
http://www.asteriosk.gr/blog/2009/02/20/pty-allocation-request-failed-on-channel-0/
http://platonic.techfiz.info/2008/10/13/pty-allocation-request-failed-on-channel-0/comment-page-1/#comment-11048

11 comments to PTY allocation request failed on channel 0

  1. xifs says:

    呵呵,既然是服务器环境那就求稳定了
    不是必须情况那就不要升级Arch了,

  2. Terry says:

    Arch每次升级都回让人提心吊胆,下次咱们搬家还是用Ubuntu Server吧;-)

  3. Testing spamfree plugin.

  4. @Terry: 终于弄出一个比较满意的留言通知插件。

  5. Dongsheng Cai says:

    @Dongsheng Cai: Testing take 2

  6. [...] 根据这个链接;,使用 “ssh ${user}@${host} ‘/bin/bash -i’”命令来登陆即可进入。 [...]

  7. [...] 根据这个链接;,使用 “ssh ${user}@${host} ‘/bin/bash -i’”命令来登陆即可进入。 [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>