Php Wordpress容器中的SSH失败

Php Wordpress容器中的SSH失败,php,wordpress,docker,ssh,Php,Wordpress,Docker,Ssh,我在Rasperry Pi上的docker容器中运行Wordpress。我已经通过管理控制台登录并安装了WPTerm插件。当启动WPTerm并使用ssh时,使用以下参数 ./ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -v -T -i ./id_rsa root@172.10.10.2 我得到了错误 debug1: Authenticator

我在Rasperry Pi上的docker容器中运行Wordpress。我已经通过管理控制台登录并安装了WPTerm插件。当启动WPTerm并使用ssh时,使用以下参数

./ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -v -T -i ./id_rsa root@172.10.10.2
我得到了错误

debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connection established.
debug1: identity file ./id_rsa type 0
debug1: identity file ./id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.3
debug1: Remote protocol version 2.0, remote software version ssh2js0.0.23srv
debug1: no match: ssh2js0.0.23srv
...
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group1-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
...
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
...
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentication succeeded (none).
Authenticated to 172.10.10.2 ([172.10.10.2]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
shell request failed on channel 0
我尝试了WPTerm exec、shell_exec、system、passthru和popen的不同设置,但它们都抛出相同的错误


如何让ssh客户端打开shell?

服务器看起来像一个基于包的nodejs模块

我查看了NPM存储库中的几个模块,发现它们不支持交互式会话

它们支持SFTP,可以执行命令,但没有交互式输入流


请尝试
ssh/bin/bash-i
-它不会分配pts,但仍可能以或多或少的交互方式接受命令。

我通过使用到本地主机的反向ssh隧道找到了解决问题的方法

 ./ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -v -i ./id_rsa root@172.10.10.2 -R 22:172.10.10.2:22 -fN root@192.168.1.107

它不能解决我原来的问题,但现在已经足够了

你在其他地方也试过了吗?我的意思是,可能由于
shell
配置错误,服务器无法继续ssh会话。请显示远程服务器软件的日志行:
debug1:remote protocol version 2.0,remote software version…
如果远程服务器If
mod_sftp
则它不支持交互式会话,只有SFTP会话。@PakUula I更新了调试输出您是否启用了ssh_config
UsePAM yes
?如果然后尝试设置为
no
,不幸的是,这也不起作用,但我找到了解决办法!