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?
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
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).
Welcome to Q&A forum for C# and VB.NET developers working with following .NET components:
Applications:
If you need immediate assistance, please contact us directly.