This project is read-only.

Unable to show result if it has more than a line.

May 23, 2013 at 3:03 PM
Edited May 23, 2013 at 3:05 PM

First of all thanks for developing such a great library for SSH.

I am facing a problem whereby I am not able to show the result if I execute command such as "ls", which will return result with more than a line. The result would be blank even though the ExitStatus is 0.
However, it works perfectly if the command (i.e. "pwd" or "date") only returns one line.

Below is the code snippet which I am using currently:
using (SshClient client = new SshClient("host", "username", "password"))

  SshCommand cmd = client.CreateCommand("ls"); //works perfectly if substitutes "ls" with "pwd" or "date" which will only return result with one line.


  string result = cmd.Result;

I would very appreciate if anyone of you could enlighten me so that the problem of displaying multiple line of result could be solved.

Thanks in advance. :)