Skip to content

SSHD: the output of some command is empty #43

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

Closed
khattori opened this issue Dec 1, 2015 · 2 comments
Closed

SSHD: the output of some command is empty #43

khattori opened this issue Dec 1, 2015 · 2 comments

Comments

@khattori
Copy link

khattori commented Dec 1, 2015

For instance, the following command

$ ssh someuser@somehost cmd.exe /C dir

outputs emty result.

The debug log of SSHD:

debug1: Executing command: cmd.exe /C dir
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 464
debug1: session_exit_message: session 0 channel 0 pid 464
debug1: session_exit_message: release channel 0
debug1: read from socket sfd [9] failed with error code [10054]
debug1: read from socket sfd [3] failed with error code [10035]
debug1: read from socket sfd [7] failed with error code [10054]
debug1: session_by_channel: session 0 channel 0
debug1: session_close_by_channel: channel 0 child 0
debug1: session_close: session 0 pid 0
debug1: channel 0: free: server-session, nchannels 1
WaitForSingleObject in thread [0] failed with error code [298]
@quamrulmina
Copy link
Contributor

Please try it with the latest release. "ssh someuser@somehost cmd.exe /C dir" should not produce the directory output of the user's home directory.

@quamrulmina
Copy link
Contributor

New releases have fixed the issues. Windows cmd shell commands are to be run using cmd /c command format but other external commands can be run directly without cmd. E.g. all these will work:
ssh someuser@somehost cmd /C dir
ssh someuser@somehost cmd /C set
ssh someuser@somehost hostname
ssh someuser@somehost myprogram.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants