SSH Client Session in C# -


i trying use sshnet (renci) create ssh client session in c# application. cannot seem understand how work. essentially, can connection server, when try submit commands, not getting returned server. using sshclient , sshshell perform communication. doing wrong?

ssh.connect();  var input = new memorystream(); var sr = new streamwriter(input); var output = console.openstandardoutput();  idictionary<renci.sshnet.common.terminalmodes, uint> termkvp = new dictionary<renci.sshnet.common.terminalmodes, uint>(); termkvp.add(renci.sshnet.common.terminalmodes.echo, 53);  var shell = ssh.createshell(input, output, output, "xterm", 80, 24, 800, 600, termkvp, 1024); shell.stopped += delegate {     console.writeline("\ndisconnected..."); };  shell.start();  while (true) {     string command = console.readline();      if (command == "exit") break;      sr.writeline(command);     sr.flush();     thread.sleep(1000 * 1); }  shell.stop(); 


Popular posts from this blog