New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/crypto/ssh: failed to interact with Windows Powershell OpenSSH server #18901
Comments
/cc @hanwen |
what is the problem you observe? 2017/02/02 16:23:23 send(1): ssh.windowAdjustMsg{PeersId:0x0, AdditionalBytes:0x4} looks suspect, since it shouldn't be happening after we send the channelClose. |
@hanwen Do you refer to second above log? |
the remote end has a bug. You can see it wants to send something (it sends windowAdjust) but then it sends exit-status and closes the channel before sending the data. 2017/02/02 16:19:59 decoding(1): 93 &ssh.windowAdjustMsg{PeersId:0x1, AdditionalBytes:0x200000} - 9 bytes |
Sorry, I think the windowAdjust is the remote end saying we can send more data. Nevertheless, the remote end kills the connection before flushing its data. So nothing prints. |
@hanwen ok, thanks. |
@hanwen one more addon, when we execute
then we have the same issue. |
Does this work differently with other SSH clients? My suggestion is to write a little wrapper that flushes the output and sleeps for a bit so the data has the chance to get to the other side. |
@hanwen I don't know I have tried only |
@hanwen Did you suggest wrapper around |
The wrapper has to run on the remote end, and be alive long enough to send the output. |
@hanwen Thanks. I think they (https://github.com/PowerShell/Win32-OpenSSH) have to resolve right order of messages because after |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8
What operating system and processor architecture are you using (
go env
)?amd64 windows
What did you do?
What did you expect to see?
Output in console: Ok
What did you see instead?
Nothing
The other side of ssh channel is open-ssh https://github.com/PowerShell/Win32-OpenSSH
v0.0.8.0
This is normal output when we run program as is (no
ok
in console):This is interrupted (debugged via breakpoint, check it out by time stamp) output of the same program (we can see we received additional
data packet
and output is what I have expected),:I will create the same issue at https://github.com/PowerShell/Win32-OpenSSH.
Maybe the issue is not related entirely to this repo but I post this issue to this repo because it strange if we get the expected behavior while debugging program.
The text was updated successfully, but these errors were encountered: