问题描述
我正在尝试连接到SFTP服务器以下载一些文件.该代码用C#编写,我正在使用FluentFTP连接到FTP.客户端将端口设置为22.但是,当我尝试以下代码时,出现错误
I am trying to connect to SFTP server to download some files. The code is written in C# and I am using FluentFTP to connect to the FTP. Client has given port as 22. But when I try the following code, I am getting the error
任何使用FluentFTP的人都可以向我建议代码中缺少的内容.
Anyone who worked on FluentFTP can suggest me what I am missing in my code.
FtpClient fclient = new FtpClient("xxx.yyy.com", "username", "password");
fclient.EncryptionMode = FtpEncryptionMode.Implicit;
fclient.SslProtocols = SslProtocols.Tls12;
fclient.Port = 22;
fclient.Connect();
谢谢.
推荐答案
FluentFTP是FTP(S)客户端.
FluentFTP is FTP(S) client.
SFTP是完全不同的协议.另请参见是"SFTP"还是和"FTP over SSL"一样吗?
SFTP is a completely different protocol. See also Is "SFTP" and "FTP over SSL" a same thing?
您不能使用FluentFTP连接到SFTP服务器.
You cannot use FluentFTP to connect to an SFTP server.
这篇关于“由于意外的分组格式,握手失败".连接到SFTP服务器时出现FluentFTP错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!