-
Notifications
You must be signed in to change notification settings - Fork 18k
x/crypto/ssh: possible missing stdout? #27014
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
Comments
the trace looks perfectly valid. You could try to insert some sleep statements in CombinedOutputs(). I bet dropbear is doing something wrong with their synchronization. |
Thank you. I strongly suspect that dropbear is the culprit as well. |
seems like the command are not even being executed. Any tip on how to further trouble shoot this only from the client side? My naive approached would be to exam each of the ssh layers. |
CombinedOutput() is just shorthand for a couple of other commands. You copy & paste that code, and remove the bits that close channels etc. |
you can also compare with openssh doing ssh -vvvv and see how Go and SSH traces are different. |
Does not seem like there is a Go bug here. Closing. Feel free to ask around in the forums on how to debug this better. |
Please answer these questions before submitting your issue. Thanks!
What did you do?
code is here: very basic ssh run command
https://play.golang.org/p/eYDOY1qg6aJ
ssh server is an embed system running dropbear.
SSH-2.0-dropbear_2016.73
Using Python Pamiko and OpenSSH client works just fine.
debug info:
2018/08/15 19:25:23 send global(1): ssh.channelOpenMsg{ChanType:"session", PeersID:0x1, PeersWindow:0x200000, MaxPacketSize:0x8000, TypeSpecificData:[]uint8(nil)}
2018/08/15 19:25:23 decoding(1): 91 &ssh.channelOpenConfirmMsg{PeersID:0x1, MyID:0x0, MyWindow:0x6000, MaxPacketSize:0x7ff7, TypeSpecificData:[]uint8{}} - 17 bytes
2018/08/15 19:25:23 send(1): ssh.channelRequestMsg{PeersID:0x0, Request:"exec", WantReply:true, RequestSpecificData:[]uint8{0x0, 0x0, 0x0, 0x4, 0x68, 0x65, 0x6c, 0x70}}
2018/08/15 19:25:23 decoding(1): 99 &ssh.channelRequestSuccessMsg{PeersID:0x1} - 5 bytes
2018/08/15 19:25:23 send(1): ssh.channelEOFMsg{PeersID:0x0}
2018/08/15 19:25:23 decoding(1): data packet - 12 bytes
2018/08/15 19:25:23 send(1): ssh.windowAdjustMsg{PeersID:0x0, AdditionalBytes:0x3}
2018/08/15 19:25:23 decoding(1): data packet - 55 bytes
2018/08/15 19:25:23 decoding(1): 96 &ssh.channelEOFMsg{PeersID:0x1} - 5 bytes
2018/08/15 19:25:23 send(1): ssh.windowAdjustMsg{PeersID:0x0, AdditionalBytes:0x2e}
2018/08/15 19:25:23 decoding(1): 98 &ssh.channelRequestMsg{PeersID:0x1, Request:"exit-status", WantReply:false, RequestSpecificData:[]uint8{0x0, 0x0, 0x0, 0x0}} - 25 bytes
2018/08/15 19:25:23 decoding(1): 97 &ssh.channelCloseMsg{PeersID:0x1} - 5 bytes
2018/08/15 19:25:23 send(1): ssh.channelCloseMsg{PeersID:0x0}
What did you expect to see?
capture all of the SSH output
What did you see instead?
just "Bye bye. Have a nice day!!!"
Which is what the CLI send when exiting.
It show that ssh is connecting but output for the commands seems to be missing.
System details
The text was updated successfully, but these errors were encountered: