I'm running Wordpress inside a docker container on a Rasperry Pi. I've logged in via the admin console and installed the WPTerm plugin. When starting the WPTerm and using ssh with the following arguments
./ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -v -T -i ./id_rsa [email protected]
I get the error
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
I have tried different settings for WPTerm exec, shell_exec, system, passthru and popen but all of them throw the same error.
How can I get the ssh client to open a shell?
I found a workaround to my problem by using a reverse ssh tunnel to the local host
./ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -v -i ./id_rsa [email protected] -R 22:172.10.10.2:22 -fN [email protected]
It doesn't solve the original problem I had but it's enough for now
The server looks like a nodejs module based on ssh-streams package.
I reviewed several modules in NPM repository and found that they don't support interactive sessions.
They support SFTP and can execute commands, but no interactive input streams.
Try ssh <keys> /bin/bash -i - it will not allocate a pts, but still might accept commands in more or less interactive way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With