0 votes

Good morning,
im trying to connect to ftp server but ConnectSSL throw this exception:

Additional information: Authenticate as SSL client failed. You might be connecting to non SSL port.

i can connect using filezilla but cant with this code:

using (Ftp client = new Ftp())
     client.Mode = FtpMode.Passive;
     client.ServerCertificateValidate += ValidateCertificate;
     client.ConnectSSL(ftpUrl, puerto);
     client.Login(username, password);

     foreach (FtpItem item in client.GetList())
         if (item.IsFolder == true)
              Console.WriteLine("[{0}]", item.Name);
              Console.WriteLine("{0}", item.Name);

I cant see the problem. Can you help me?

Thank you very much

by (600 points)

2 Answers

0 votes
Best answer

Most likely you are using incorrect port.

To use default value (990) simply skip this parameter:

by (293k points)
selected by
0 votes

i need to connect to specific port (22222) i cant use default port

thank you very much

by (600 points)
im still getting the same error :(
   client.ConnectSSL(ftpUrl, port);
   client.Connect(ftpUrl, port);