SSH 服务器已连接,但未打开 shell 会话

SSH 服务器已连接,但未打开 shell 会话

我有一台服务器,我可以使用 SSH 登录,但无法获取 shell(不再获取)。我该怎么做才能登录到最小 shell 来调试该问题?以下是ssh -vvvv

debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering ED25519 public key: user@myhost
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: /home/user/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
Authenticated to remotehost ([x.x.x.x]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network

通常情况下,会话将继续进行

debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start

但这里 ssh 只是挂起。

我如何获取登录 shell?我试过了ssh -t user@host /bin/sh,但没有成功。

我不确定 ssh 服务器中是否有问题(可能在网络错误时等待 rDNS 解析?)或者某些登录 shell 脚本是否阻止了 shell。

相关内容