ssh timeout does not work

0 votes
asked Aug 22, 2011 by mensrifles (120 points)
edited Aug 23, 2011

Ssh client = new Ssh(); client.Timeout = 1; client.Connect("192.168.1.10",22);

I expected this to timeout after 1 second, but it timed out after 5 seconds.

What is the problem?

commented Aug 23, 2011 by Lukas Pokorny (102,210 points)
edited Aug 23, 2011

The Timeout value doesn't apply to the whole method (Connect or other), but to its separate sub-operations (connect, exchange welcome messages, negotiate SSH session). To be able to tell what is going on and why we didn't time out earlier, a communication log would be needed - check out http://www.rebex.net/kb/logging.aspx for how to create one and either add it to your post or mail it to support@rebex.net

1 Answer

0 votes
answered Aug 23, 2011 by Lukas Pokorny (102,210 points)
edited Aug 23, 2011

Also, please note that the Timeout value is specified in miliseconds, which means it should be set to 1000 to specify 1 second. However, 1000 is the lowest allowed value - if you set it to 1-999, it defaults to 1000 (1 second).

...