How do I determine if a server requires an SSL connection.

0 votes
asked Jul 11, 2011 by John Hancock (260 points)
edited Jun 28, 2013

Given a server address and port number, how do I determine if I need to use an SSL FTPS connection or a standard non-encrypted FTP connection?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Jul 12, 2011 by Lukas Pokorny (99,970 points)
edited Jul 12, 2011

If the port number is 990, use implicit SSL (FtpSecurity.Implicit). If the port number is 21, it's more complicated - it's either non-encrypted connection or it's secured using explicit SSL (FtpSecurity.Explicit). If unsure, establish a non-encrypted connection first and try to enable explicit SSL later by calling Ftp object's Secure method (if it throwns an FtpException, it means that explicit SSL is not possible, but you can still continue using the connection in standard non-encrypted mode.

(Finally, if the port number is 22, you need to use Rebex SFTP instead of Rebex FTP/SSL.)

...