Re: Timeout occurred due to inactivity when I exec (General questions)
Hi Sajjad,
Can you please move your code from Connected Event just after Connect Method. You are using blocking mode and commands are executed line by line so you don't need Events.
Also please remove Prompt Property because you don't need it if you are using WaitFor Method.
If you still receive error on WaitFor line please change it to this:
[code]Ssh1.WaitFor( regex:[\$ #>] $ )[/code]
When using Execute Method you should add second prompt parameter also and send (
or
) sequence at the end of your command.
Something like this:
[code]Console.Write(Ssh1.Execute( cd /tmp
, regex:[\$ #>]$ ));[/code]
More help fro Execute Method you can find here:
http://www.weonlydo.com/SSH.NET/Help/WeOnlyDo.Client.SSH.Execute_overload_2.html
Let us know how it goes.
Regards,
Drazen
Complete thread:
- Timeout occurred due to inactivity when I execute - sajjad, 2009-03-17, 07:55
- Re: Timeout occurred due to inactivity when I exec - woddrazen, 2009-03-17, 09:00
- Re: Timeout occurred due to inactivity when I exec - sajjad, 2009-03-20, 08:24
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-20, 08:41
- Re: Timeout occurred due to inactivity when I exec - sajjad, 2009-03-20, 08:56
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-20, 09:18
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-20, 10:51
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-24, 10:09
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-20, 10:51
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-20, 09:18
- Re: Timeout occurred due to inactivity when I exec - sajjad, 2009-03-20, 08:56
- Re: Timeout occurred due to inactivity when I exec - wodDamir, 2009-03-20, 08:41
- Re: Timeout occurred due to inactivity when I exec - sajjad, 2009-03-20, 08:24
- Re: Timeout occurred due to inactivity when I exec - woddrazen, 2009-03-17, 09:00