Open Mika56 opened 2 years ago
Attaching a logger to connect
yields more details:
[debug] Sending Amp\Ssh\Message\ChannelOpen packet
[debug] Receive Amp\Ssh\Message\ChannelOpenConfirmation packet
[debug] Sending Amp\Ssh\Message\ChannelRequestExec packet
[debug] Receive Amp\Ssh\Message\ChannelWindowAdjust packet
[debug] Receive Amp\Ssh\Message\ChannelSuccess packet
[debug] Receive Amp\Ssh\Message\ChannelData packet
[debug] Receive Amp\Ssh\Message\ChannelEof packet
[debug] Receive Amp\Ssh\Message\ChannelRequestExitStatus packet
[debug] Receive Amp\Ssh\Message\ChannelClose packet
Session 9 output: Sat 05 Mar 2022 06:01:34 PM CET
[debug] Sending Amp\Ssh\Message\ChannelOpen packet
[debug] Receive Amp\Ssh\Message\ChannelOpenFailure packet
[debug] Sending Amp\Ssh\Message\Disconnect packet
[debug] Shuting down ssh connection
[critical] Error thrown while running command "ssh-session-test -vvv". Message: "Failed to open channel : open failed"
Channel::close
is supposed to send a ChannelClose
message but when don't see any sent
Hi,
Using
Process
, it looks like the SSH sessions are not properly closed. This is easy to reproduce, you just have to send more than 10 commands:The output with
$sessions = 10;
is as expected:However, adding one more session fails:
Here are the corresponding logs from the SSH server:
I'm no expert on SSH, but from what I could gather, the log should look like this:
I think the
Amp\Ssh\Channel
channel is closed too soon, and the client is not acking the session close from the server, which has the consequence of not closing the session on the server side