Skip to content
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

Allow writing to stdin of SshCommand #141

Closed
hifi opened this issue Dec 27, 2016 · 9 comments
Closed

Allow writing to stdin of SshCommand #141

hifi opened this issue Dec 27, 2016 · 9 comments
Milestone

Comments

@hifi
Copy link
Contributor

hifi commented Dec 27, 2016

SshCommand doesn't currently implement any way to write a long binary stream into stdin of the executed process.

SshCommand would need an InputStream property that would provide a writable stream which would also send the EOF packet when closed by the writer.

@hifi
Copy link
Contributor Author

hifi commented Dec 29, 2016

PR #144 now implements this.

@21region
Copy link

Could you, please, provide a high level view of how this will be used?
I'm interested in this feature, because it looks like it will allow to do on-the-fly decompression.

@hifi
Copy link
Contributor Author

hifi commented Jan 11, 2017

There's the other PR that is more alive than this one (for stdout/stderr). The general idea is that you use streams to communicate with a remote process like you would on the local machine like with System.Diagnostics.Process with the stream properties StanardInput/StandardOutput/StandardError.

@dosvidos
Copy link

It's quite embarrassing that SSH.NET doesn't redirect stdin for remotely executed command.
This functionality is supported by Open SSH server and popular SSH client libraries like Paramiko

@realvizu
Copy link
Contributor

I have a fork that implements this feature. Shall I submit a PR for it?
I mean, would there be someone willing to review and merge it?

I'm asking because I think that there are already 2 dead PRs about this subject: #144 and #1052 .
I'm not sure what went wrong with those PRs so that they were never merged and I'd like to avoid falling into the same trap.
Maybe the scope of those PRs were too big by introducing a few new types that were not necessary for the feature? (Pipe, LinkedListQueue, etc.)
My PR would contain only the bare minimum for the feature: the ChannelInputStream class and the SshCommand.InputStream property.

@WojciechNagorski
Copy link
Collaborator

You should definitely create a new pull request. Previous pull requests do not pass unit and integration tests.

This change is really important for me so if you create a pull request it will be on the first place on my list.

@realvizu
Copy link
Contributor

@WojciechNagorski Please check out this PR: #1293

@realvizu
Copy link
Contributor

realvizu commented Feb 7, 2024

@WojciechNagorski Thanks for merging the PR!
Any plans about when a new nuget version will be released?

@WojciechNagorski
Copy link
Collaborator

Fixed by #1293

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

No branches or pull requests

6 participants