Subject: Cancel SSH Connection
Date: 2015-04-14 16:13:37
From: David Angell
Source: cancel-ssh-connection
----------------------------------------------------------------------

After calling Connect on the SSHClient, is there any way to cancel the connection attempt if it is taking too long?  I thought maybe I could call Disconnect or Dispose from another thread, but no luck.  I have to wait until the timeout expires.  You can do this with basic sockets by closing the socket from another thread while it is trying to connect.  If my SSH server has a problem that is causing the connection to take a long time, it would be nice for me to have a way for my users to actually cancel the attempt and clean things up without having to wait for the timeout. 

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index