【发布时间】:2020-06-24 17:10:26
【问题描述】:
我正在使用此代码尝试建立与 Windows FTP 服务的 FTP 连接
FtpClient client = new FtpClient(ip, user, password);
client.ConnectTimeout = 600000;
client.ReadTimeout = 60000;
client.EncryptionMode = FtpEncryptionMode.Implicit;
client.SslProtocols = System.Security.Authentication.SslProtocols.Tls;
client.DataConnectionType = FluentFTP.FtpDataConnectionType.PASV;
client.ValidateAnyCertificate = true;
client.Connect();
在 Windows 机器上,连接已正确建立,但在我的 Ubuntu 机器上无法建立连接,我总是收到错误提示
"error:141E70BF:SSL routines:tls_construct_client_hello:no protocols available"
我怎样才能完成这项工作?
=============更新
我尝试了 FTPClient 的 AutoDetect 方法,但该方法没有检索到任何配置文件
AutoConnect 方法似乎也可以连接,但是当我尝试获取文件夹列表时,会出现配置文件需要 SSL 的错误
当我为客户端启用跟踪时,我会在日志中得到以下输出:
# Connect()
Status: Connecting to server:21
Response: 220-Microsoft FTP Service
Response: 220 ************************************************************
Status: Detected FTP server: WindowsServerIIS
Command: AUTH TLS
Response: 234 AUTH command ok. Expecting TLS Negotiation.
Status: Disposing FtpSocketStream...
Error: FTPS Authentication Failed
【问题讨论】:
标签: ubuntu .net-core fluentftp