Reputation: 400
The original Unix implementation simply did something like this:
ssh [batchname] < [inputfilename] > [outputfilename]
I need to be able to do the same thing from a windows machine running an application written in C#. I've tried using SharpSsh, which includes input and output streams, but they don't seem to work.
How can I pipe the input and output files/streams using SharpSsh (or any other .Net library)?
Upvotes: 1
Views: 1013
Reputation: 400
Figured it out. Either the application running or SSH itself expects a ctrl-d to signal the end of the input. At that point, the output stream can be read without hanging.
Upvotes: 1