Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 来自 Ruby on Rails 应用程序的 FTPS (TLS/SSL)
嗨伙计,
如何从 Ruby (RoR) 连接到 ftps(通过 Ruby on Rails 中的显式 TLS/SSL 进行的 ftp)主机?
谷歌搜索没有提供答案。
找到了解决方案:我们可以使用lftp实用程序,然后从 ruby 调用它。
lftp
lftp -f file_with_command
在“file_with_command”文件中我们指定:
lftp -u %s,%s %s get '%s' exit
其中%s将替换为用户名、密码、主机名、文件以对应获取。
%s