Setting connection timeout |
You can use the Scp.Timeout property to define the maximum number of milliseconds to wait when establishing a connection to an ssh server. Failure to establish a connection within the maximum time allowed will result in an exception.
Example
[C#]
// set connection timeout to 5 seconds
scp.Timeout = 5000;
[VB]
' set connection timeout to 5 seconds
scp.Timeout = 5000