"The handshake failed due to an unexpected packet format" 连接到 SFTP 服务器时出现 FluentFTP 错误
"The handshake failed due to an unexpected packet format" FluentFTP error when connecting to SFTP server
我正在尝试连接到 SFTP 服务器以下载一些文件。代码是用 C# 编写的,我正在使用 FluentFTP 连接到 FTP。客户端已将端口指定为 22。但是当我尝试以下代码时,出现错误
The handshake failed due to an unexpected packet format
任何使用 FluentFTP 的人都可以告诉我我的代码中缺少什么。
FtpClient fclient = new FtpClient("xxx.yyy.com", "username", "password");
fclient.EncryptionMode = FtpEncryptionMode.Implicit;
fclient.SslProtocols = SslProtocols.Tls12;
fclient.Port = 22;
fclient.Connect();
谢谢。
流利FTP 是 FTP(S) 客户。
SFTP 是一个完全不同的协议。另见 Is "SFTP" and "FTP over SSL" a same thing?
您不能使用 FluentFTP 连接到 SFTP 服务器。您必须使用另一个 SFTP 库,请参阅 SFTP Libraries for .NET。
我正在尝试连接到 SFTP 服务器以下载一些文件。代码是用 C# 编写的,我正在使用 FluentFTP 连接到 FTP。客户端已将端口指定为 22。但是当我尝试以下代码时,出现错误
The handshake failed due to an unexpected packet format
任何使用 FluentFTP 的人都可以告诉我我的代码中缺少什么。
FtpClient fclient = new FtpClient("xxx.yyy.com", "username", "password");
fclient.EncryptionMode = FtpEncryptionMode.Implicit;
fclient.SslProtocols = SslProtocols.Tls12;
fclient.Port = 22;
fclient.Connect();
谢谢。
流利FTP 是 FTP(S) 客户。
SFTP 是一个完全不同的协议。另见 Is "SFTP" and "FTP over SSL" a same thing?
您不能使用 FluentFTP 连接到 SFTP 服务器。您必须使用另一个 SFTP 库,请参阅 SFTP Libraries for .NET。