无法通过SSH连接到服务器 – “服务器拒绝分配pty”

我有一个STRATO V-PowerServer与Ubuntu 10.10运行我的东西,但最近有问题通过SSH连接到服务器。

基本上我所有的是SSH访问服务器,如果有必要,我可以启动到一个恢复模式,所有我的东西在/修复,以便我可以做任何修复系统。

问题是,当我尝试通过SSH连接到服务器,我得到这个错误:

Using username "florian". florian@mydomain.de's password: Server refused to allocate pty Linux hwn36335 2.6.18-028stab070.5 #1 SMP Fri Sep 17 15:37:23 MSD 2010 i686 GNU/Linux Ubuntu 10.10 Welcome to Ubuntu! * Documentation: https://help.ubuntu.com/ /home/florian/.zlogin:1: command not found: display_info 

所以shell不能打开,我不能input任何命令。 我已经尝试谷歌“服务器拒绝分配pty”,但找不到任何帮助,虽然这个问题发生在其他人之前。 此外,我有时甚至会得到一个不同的错误:“通道0上的pty分配请求失败”,而不是其他错误。 对于这个问题,我只能find这个:

http://blog.dinotools.de/2010/10/03/fehler-pty-allocation-request-failed-on-channel-0

但不幸的是,它并没有帮助…

有没有人有一个想法,为什么这个错误是造成的,我可以尝试解决它?

如果你能给我提示,会很棒。 我知道一些基本的东西,知道如​​何与我的服务器工作,但如果这深深地解决问题,我在我的极限…… ;-)谢谢!

加法1:

/var/log/auth.log

 Jan 24 16:20:01 h1696522 CRON[3417]: PAM unable to dlopen(/lib/security/pam_smbpass.so): /lib/security/pam_smbpass.so: cannot open shared object file: No such file or directory Jan 24 16:20:01 h1696522 CRON[3417]: PAM adding faulty module: /lib/security/pam_smbpass.so Jan 24 16:20:01 h1696522 CRON[3417]: pam_unix(cron:session): session opened for user www-data by (uid=0) Jan 24 16:20:03 h1696522 CRON[3417]: pam_unix(cron:session): session closed for user www-data 

/var/log/daemon.log

 Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50003.vdb - dwr50003.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50004.vdb - dwr50004.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50005.vdb - dwr50005.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50006.vdb - dwr50006.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50007.vdb - dwr50007.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50008.vdb - dwr50008.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwr50009.vdb - dwr50009.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/dwrtoday.vdb - dwrtoday.vdb with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/updates/timestamp - timestamp with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: /var/drweb/bases/update.drl - update.drl with such CRC32 already exists, downloading has been skipped Jan 24 16:00:02 h1696522 update.pl[14292]: deleting old files ... Jan 24 16:00:02 h1696522 update.pl[14292]: moving downloaded files from temporary to working directory ... Jan 24 16:00:02 h1696522 update.pl[14292]: sending notifications ... Jan 24 16:00:02 h1696522 update.pl[14292]: summary => updated: 0, removed: 0 files and 0 messages Jan 24 16:00:02 h1696522 update.pl[14292]: Finish Success: 2011-01-24 16:00:02 Jan 24 16:00:02 h1696522 update.pl[14292]: Socket path is /var/drweb/run/updateSock 

你有没有尝试重新创buildpty和tty设备?

 root@mydomain.de:~# /sbin/MAKEDEV tty root@mydomain.de:~# /sbin/MAKEDEV pty 

这似乎是虚拟服务器上的一个已知问题…

如果您无法访问任何shell,则可以尝试通过ssh发送命令:

 florian@localmachine:~$ ssh root@mydomain.de "/sbin/MAKEDEV tty" florian@localmachine:~$ ssh root@mydomain.de "/sbin/MAKEDEV pty" 

编辑以反映您的评论:

如果你使用chroot,你还必须挂载/ proc,/ dev和/ sys:

 root@h1696522:/# mount -o bind /proc /repair/proc root@h1696522:/# mount -o bind /dev /repair/dev root@h1696522:/# mount -o bind /sys /repair/sys 

它应该现在工作。

如果您有控制台访问权限

 mount devpts /dev/pts -t devpts 

我遇到了这个错误的时候,我修正了它,certificateudev软件包已经安装并正在运行。 Udev负责在需要时创build设备节点,例如ssh所需的PTS / x。 试一试。

尝试这个:

 ssh root@host "mount -o remount /dev/pts"