Update: This has been fixed in version 2016 R2 of Rebex SFTP and Rebex Terminal Emulation.
Hi, thanks for letting us know about this problem. We will fix it for the next release.
In the meantime, you can use the following workaround:
int timeout = 1000;
var socket = new ProxySocket();
var ar = socket.BeginConnect(IPAddress, 22, null, null);
if (!ar.AsyncWaitHandle.WaitOne(timeout))
{
socket.Close();
throw new ProxySocketException("Operation timed out.", ProxySocketExceptionStatus.Timeout);
}
socket.EndConnect(ar);
var session = new SshSession(socket);
session.Timeout = timeout;
session.Negotiate();
session.Authenticate(UserName, Password);