Re: Missing wait for response in SSH.net buffer an - WeOnlyDo Discussion board

Re: Missing wait for response in SSH.net buffer an (General questions)

by woddrazen, Thursday, April 23, 2009, 17:11 (5692 days ago) @ Sunny

Hi Sunny,


You can use regular expressions in WaitFor and Execute Method if you don't know exact prompt.

Something like this[code] ssh1.Blocking = true;
ssh1.Connect();

ssh1.WaitFor( regex:[\$ #>] $ );
ssh1.DataReady = 0;
Console.Write (ssh1.Execute( ls -al\n , regex:[\$ #>] $ ));[/code]
Can you try that and let us know how it goes.


Regards,
Drazen


Complete thread: