I am using sharpssh.dll and want to connect to a sftp server, but if the sftp server is diconnected from network, the program will wait for a long time before “timeout” message is shown, is there anyway to set a timeout sharpssh?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As of right now, I don’t think SharpSSH’s API exposes the timeout functionality of the Session in Sftp.cs. It’s available in some of the lower level implementation classes, so I don’t know how difficult it would be to do right now.
I’ve been rolling in some patches to SharpSSH, though I don’t do much work on it anymore so I wouldn’t really deem it “supported”. You can submit a request at https://bitbucket.org/mattgwagner/sharpssh if you’d like.
Though, you may want to check out http://sshnet.codeplex.com/ which is a much cleaner, supported library for your SSH needs.