You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using x/crypto/ssh to connect with sshd there is no output from the session with CombinedOutput. And manually using OpenSSH to connect to sshdsometimes doesn't give any output back.
I suspect there is a race condition somewhere but I have not managed to figure out where.
To Reproduce
Start sshd and use x/crypto/ssh to open a session and use CombinedOutput. It will fail with EOF.
Expected behavior
The command should return something.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
My running theory is that using e.Process.Wait instead of e.Wait() is the main issue, as we are exiting the before everything is written to stdout/stdin/stderr.
I'm at a loss on how we should properly fix this, but I'm wondering if just execing with CombinedOutput and then io.Copy it to c would be a better solution? Currently it seems e.Wait() chokes on the channel we are giving it.
I had similar issue with EOF when I was trying to write test for this command: #2963 and initially I was trying combinedOutput or Output and got only EOF. I tested sshd command with other ssh clients and saw no issues, but what seemed to work is to pipe Stdout and then I got an output. But still I have linux box where this test fails reliably :)
Describe the bug
When using
x/crypto/ssh
to connect withsshd
there is no output from the session withCombinedOutput
. And manually using OpenSSH to connect tosshd
sometimes doesn't give any output back.I suspect there is a race condition somewhere but I have not managed to figure out where.
To Reproduce
Start
sshd
and usex/crypto/ssh
to open a session and useCombinedOutput
. It will fail withEOF
.Expected behavior
The command should return something.
Additional context
N/A
The text was updated successfully, but these errors were encountered: