CENTOS 内核升级并重启后没有 TTY 终端

CENTOS 内核升级并重启后没有 TTY 终端

有一个 VPS,最近我安装了一个新内核

yum history info
Loaded plugins: fastestmirror
Transaction ID : 17
Begin time     : Wed Sep 13 18:52:31 2017
Begin rpmdb    : 326:8f3454e6d38e70d6ac928fefe6cf9bca4452651b
End time       :            18:52:36 2017 (5 seconds)
End rpmdb      : 327:027e38263c0cfc9e7738a9b3fc159e9c0e427b09
User           : root <root>
Return-Code    : Success
Command Line   : install kernel-devel
Transaction performed with:
Installed     rpm-4.8.0-55.el6.x86_64                       installed
Installed     yum-3.2.29-81.el6.centos.noarch               @base
Installed     yum-plugin-fastestmirror-1.1.30-40.el6.noarch @base
Packages Altered:
Install kernel-devel-2.6.32-696.10.2.el6.x86_64 @updates

重新启动后,我尝试通过 SSH 登录并收到以下消息:

PTY allocation request failed on channel 0

经过一番研究,发现使用此代码可以登录,但会出现错误:

# ssh -v -T root@server /bin/bash -i
OpenSSH_7.4p1 Debian-10+deb9u1, OpenSSL 1.0.2l  25 May 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 4: Applying options for *
debug1: Executing proxy command: exec /bin/nc -X 5 -x 127.0.0.1:9050 [server] 22
debug1: key_load_public: No such file or directory
debug1: identity file $HOME/.ssh/id_rsa type -1
[...]
debug1: identity file $HOME/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u1
debug1: permanently_drop_suid: 1000
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: Authenticating to [server]:22 as 'root'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
Authenticated to [server] (via proxy).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: proc
debug1: Sending command: /bin/bash -i
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

那么...有什么建议吗?有人谈到了/etc/resolv.conf,但即使我更改它并重新启动,原始文件也会被替换。

但基本上终端没有运行。

评论:我尝试过-ttt,但没有成功:

$ ssh -ttt root@server
PTY allocation request failed on channel 0

相关内容