CMD access on compact 2013

0 votes
asked Aug 17 by ccumberland (120 points)

We are using Compact 2013 and are trying to get an ssh server working on it. one probel we are coming across is running external apps via the ssh serve and capturing the stdin and stdout.

Does anyone have a solution or any suggetions

Regards

Chad

1 Answer

0 votes
answered Aug 17 by Lukas Pokorny (85,170 points)

This is possible, but some parts of this scenario have to be custom-implemented (this is not a primary purpose of Rebex File Server).

To make this work, you have to register a custom command using FileServer object's ShellCommand event and use the command's SshConsole's GetInputStream() (corresponds to stdio), SshConsole.GetOutputStream() (corresponds to stdout) and SshConsole.GetErrorStream() (corresponds to stderr).
http://forum.rebex.net/6863/ssh-exec-program to pass data to/from an external process.

We have sample code that demonstrates running an external command line app. However, this would have to be modified slightly to target Compact 2013 because it utilizes .NET 4.0's Task class to run background methods to pass data between Rebex File Server and the external app.

...