我正在尝试连接到 SFTP 服务器以下载一些文件。代码是用 C# 编写的,我使用 FluentFTP 连接到 FTP。客户端已将端口指定为 22。但是当我尝试以下代码时,出现错误
由于意外的数据包格式,握手失败
任何从事 FluentFTP 工作的人都可以建议我在我的代码中缺少什么。
FtpClient fclient = new FtpClient("xxx.yyy.com", "username", "password");
fclient.EncryptionMode = FtpEncryptionMode.Implicit;
fclient.SslProtocols = SslProtocols.Tls12;
fclient.Port = 22;
fclient.Connect();
谢谢。