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 Sunny, Thursday, April 23, 2009, 17:18 (5692 days ago) @ woddrazen

I know the prompt its > . I am usign the execute method and I am not getting the entire response back.

response = Ssh1.Execute(cmd+
, > , 10);

thanks,
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: