Cannot connect to FTPES - FTP over explicit TLS/SSL

Sep 14, 2012 at 3:14 PM

Hi,

I'm trying to connect to our FTP Secure (FTPES) and I keep getting this error:

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 IP(box ip adrress):22

 

This is how my code looks like:

string host = "host_address";
int port = 22;
string username = "username";
string password = "password";

SftpClient client = new SftpClient(host, port, username, password);
client.Connect();
if (client.IsConnected)
{
          System.Console.WriteLine("tunel ok");
}
else
{
          System.Console.WriteLine("tunel zle");
}
client.Disconnect();

When I connect using filezilla, there is no problem. I get the certificate agreement windows, I click OK and I'm in it.

What am I doing wrong here?

Please help and thanks in advance!

Sep 14, 2012 at 3:20 PM

Never mind, I think this protocol is not supported.

This is issued has been resolved. Thanks

Sep 14, 2012 at 3:32 PM

Hi

Glad it worked itself out.

Just so I know what to reply to others facing the same "problem", what was the cause, and what was the solution? And just for my own list, where did you get the server?

Sep 14, 2012 at 3:47 PM

I believe this library does not support FTP over SSL. In .NET, one can use the FtpWebRequest class to do FTP over SSL.

Take a look at these articles:

http://allen-conway-dotnet.blogspot.com/2010/11/download-ftp-files-using-ftp-over-ssl.html

http://blogs.msdn.com/b/adarshk/archive/2005/04/22/410925.aspx

 

Best,