Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: SSH.NET Shell display output at the last line

$
0
0
with that being said.
I am new to SSH.NET and still learning.

What would be the best point to start?

the following code

     static void ycmd(string cmd, StreamReader reader, StreamWriter writer, ShellStream stream) {
        writer.WriteLine(cmd);

        while (stream.Length == 0) {
            System.Threading.Thread.Sleep(500);
        }

        string line = reader.ReadLine();
        while (line != null) {
            Console.WriteLine(line);
            line = reader.ReadLine();
        }
    }

where streams are defined as follows

  using (var stream = ssh.CreateShellStream("dumb", 80, 24, 800, 600, 1024)) {
                var reader = new StreamReader(stream);
                var writer = new StreamWriter(stream);


already, provides all the formatting of the input/output sequences .
So, the question is what needs to changed to format this output?


Thank you.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>