Delphi 2010 中的 SSH 上的 FTP (SFTP)
我正在编写一个简单的 Delphi 应用程序来将一些文件上传到 SFTP 服务器。我以为我可以使用 TIdFTP
Indy 客户端,但似乎它们不是 FTP over SSH (SFTP) 的选项。有谁知道 Delphi 2010 的任何免费/开源组件支持 FTP over SSH (SFTP)?由于安全原因,我无法使用 Active X 控件,因此请不要使用 Active X 解决方案进行回复。
I'm writing a simple Delphi app to upload a few files to a SFTP server. I thought I would be able to use a TIdFTP
Indy client but it seams as tho their is not an option for FTP over SSH (SFTP). Does anyone know of any Free / Open source Components for Delphi 2010 that would support FTP over SSH (SFTP)? Due to security reasons I'm unable to use Active X controls, so please do not respond with Active X solutions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
SFTP 和“FTP over SSH”是两个独立的东西,都不涉及 SSL(正如其他人建议的那样)。 SFTP 是 SSH 的子协议,而“FTP over SSH”是通过带有端口转发的 SSH 连接建立隧道的 FTP 的好/坏。
不管怎样,您需要的是一个 Delphi SSH 库。我无法找到 Delphi 的免费 SSH 库,并最终购买了 SecureBlackbox (http://www.eldos.com/),顺便说一句,尽管 SecureBridge (http://www.devart.com) 看起来也很棒,但它也很棒不错。
SFTP and "FTP over SSH" are two separate things, and neither involves SSL (as someone else has suggested). SFTP is a sub-protocol of SSH while "FTP over SSH" is good/bad ol' FTP tunnelled through an SSH connection with port forwarding.
Either way, what you're after is a Delphi SSH library. I was unable to find a free SSH library for Delphi and ended purchasing SecureBlackbox (http://www.eldos.com/), which is excellent by the way, although SecureBridge (http://www.devart.com) also looks pretty good.
1) SFTP 不是基于 SSH 的 FTP。 在此处阅读讨论。
2) 对于SFTP,没有免费的Delphi 组件。您可以使用我们的 SFTP 客户端和 Delphi 服务器组件(SecureBlackbox 产品的一部分) ),这是由商业解决方案支持和维护的。
1) SFTP is NOT FTP-over-SSH. Read the discussion here.
2) For SFTP there are no free Delphi components. You can use our SFTP client and server components for Delphi (part of SecureBlackbox product), which are supported and maintained commercial solution.
我一直在使用 PuTTY 的 SCP 命令行实用程序,通过 CreateProcess 方法。
I've been using PuTTY's SCP command line utility, with catching it's standard out via the CreateProcess method.
IP*Works 包括 SFTP 组件 - http://www.nsoftware.com/products/component/ sftp.aspx 和 Delphi XE a XE2 的注册用户可以从代码中心(ID:28437,ID:28012)下载此文件
,Synapse 位于简单 SFTP 的 contrib dir demo - http://synapse.ararat.cz/files/contrib/
IP*Works include SFTP component - http://www.nsoftware.com/products/component/sftp.aspx and registered user of Delphi XE a XE2 can download this from code central (ID: 28437, ID: 28012)
and for Synapse is in contrib dir demo of simple SFTP - http://synapse.ararat.cz/files/contrib/
自 2019 年 10 月起,PuTTY 出现了带有 Delphi 单元的 DLL 分支,请参阅
https://github.com/superflexible/TGPuttyLib
创建此库是为了能够实现尽可能高的目标通过 SFTP 的传输速率。它是免费的并且非常易于使用(带有示例)。
And since October 2019, there's a DLL fork of PuTTY with Delphi units, please see
https://github.com/superflexible/TGPuttyLib
This was created to be able to achieve the highest possible transfer rates over SFTP. It's free and very easy to use (with examples).
查看 Synapse ( http://synapse.ararat.cz/doku.php/download ) 支持 ssl 协议。
示例代码: http://synapse.ararat.cz/doku.php/public:如何:tcpwithssl
Look at Synapse ( http://synapse.ararat.cz/doku.php/download ) suporting ssl protocole.
Exemple code: http://synapse.ararat.cz/doku.php/public:howto:tcpwithssl
另一个安全连接组件集来自 nSoftware:http://www.nsoftware.com/ipworks/ ssh/components.aspx
您将获得 SSH 隧道和 SFTP。
他们还提供 SSL 相关项目的完整组件集:http://www.nsoftware.com /ipworks/ssl/components.aspx
Another secure connection component set is from nSoftware: http://www.nsoftware.com/ipworks/ssh/components.aspx
You get SSH Tunnel, and SFTP.
They also offer a full component set of SSL related items: http://www.nsoftware.com/ipworks/ssl/components.aspx
libssh2(用 C 语言编写)支持 SFTP,并且我们有两个独立 Delphi 包装器(不确定哪个更好):
https://github.com/pult/libssh2_delphi
和
https://github.com/dimmaq/delphi-libssh2
DevArt 的 SecureBridge 还支持 SFTP,附带专业版的完整源代码。
libssh2 (wriiten in C) supports SFTP, and we have two separate Delphi wrappers (not sure which one is better):
https://github.com/pult/libssh2_delphi
and
https://github.com/dimmaq/delphi-libssh2
SecureBridge from DevArt also support SFTP, comes with full source for the Professional Editon.