Really hope you can assist with my query.
I am currently creating an application to integrate a SFTP server with NetSuite's file cabinet. All my code works fine when executing the application from my machine (Windows 7), but when I execute this application on a server (Windows Server 2003), I run into the following error:
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.81.200.87:22
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at Tamir.SharpSsh.java.net.Socket..ctor(String host, Int32 port)
at Tamir.SharpSsh.jsch.Util.createSocket(String host, Int32 port, Int32 timeout)
I am using SharpSSH to connect to the SFTP server.
Some of the steps I have performed to diagnose this issue:
- I have pinged the host address, which returns all packets successfully
Removed certificate restrictions using
System.Net.ServicePointManager.ServerCertificateValidationCallback
I also used the following in case of incorrect
'\\'
I could have added to the host address:Dns.GetHostEntry(host);
Indeed, I know Windows Server 2003 is very old but the business I work for have no plans to upgrade this so I just have to work with what I have. Of course, I had to downgrade the application to the .NET 3.5 framework to make it compatible.
Any help on resolving this would be most appreciated.
Regards AWB