简体   繁体   中英

How to verify if FTP supports or requires SSL connection with FtpWebRequest in C#

I have an editable FTP URL field that will allow us to pull files from that FTP.

Simple FTP: EnableSSL=false (Do not require SSL)

Explicit FTP: EnableSSL=True (Require SSL)

How can I know if FTP server supports SSL thru FtpWebRequest library of C#? I want to to identify if FTP server supports SSL.

Thank you!

The point of SSL/TLS is security. If you get attacked, the attacked will hijack the connection and if you allow an unencrypted connection for all your servers, the attacker will obviously make you use it and will steal your credentials. You have to use SSL/TLS straight away, if the server supports it. And you have to make sure the server is using a trusted certificate. Otherwise you are not secure.

Whether your server supports SSL/TLS should be part of the information you get about your FTP server and it should be configured in your code for each of your servers individually. That's not something you should be detecting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM