Is possible starts two threads with differents shh sessions?

0 votes
asked Mar 18, 2011 by Zeokat (240 points)
edited Apr 1, 2011

I caugth included example WinFormRExec, and started two threads, calling each thread to

private void SendCommand()
   code on included example....

Seems that both threads are executed and that both sessions are started, i´m sending on each thread a long runing task (a ssh cpmmand that needs some minutes). I´m using:

while (shell.IsRunning == true) {
   string line = shell.ReadLine();
   DoUpdate(line); //DoUpdate is a delegate to update the GUI

But i only receive data in real time from one thread, the other thread send all data when second thread finished. Not sure if i´m missing soemthing or if isn´t possible start two simulatenous ssh conections to same serve.

Thanks in advance for your time and help.

1 Answer

0 votes
answered Mar 18, 2011 by Zeokat (240 points)
edited Mar 18, 2011

Sorry i feel stupid :P , was my mistake, i fixed the code missed something. Solved. :)

commented Mar 18, 2011 by Lukas Pokorny (124,610 points)
No problem! Don't hesitate to ask if you run into problems again.