如何从我的网站/Web 应用程序连接到安全的 FtP?

发布于 2024-09-03 22:31:17 字数 205 浏览 2 评论 0原文

我正在制作一个网站/网络应用程序,每 5 分钟左右显示一次图像,有点像网络摄像头。图像上传到 SFTP 服务器。我如何从网络访问这些内容?有人对使用什么有什么建议吗?现在我正在研究 PHP,但也检查了 javascript 和 ruby​​。只有应用程序需要 ssh 到预定位置,用户不需要。

朋友建议我使用 rsync 并设置无密码 ssh。有人这样做过吗?或者这是一个坏主意?

I'm working on making a website/web application that displays images every 5 or so minutes, kinda like a webcam. The images are uploaded to an SFTP server. How can I access those from the web? Does anyone have any recommendations for what to use as well? Right now I'm looking at PHP but have checked out javascript and ruby as well. Only the application needs to ssh to a predetermined place, not the users.

I was suggested by a friend to use rsync and setup passwordless ssh. Anyone ever do this? or is this a bad idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

七婞 2024-09-10 22:31:18

cURL 具有 SFTP 支持。

cURL has SFTP support.

月朦胧 2024-09-10 22:31:18

PHP 支持 SFTP。您需要安装 ssh2 扩展,

http://www.php.net/manual /en/book.ssh2.php

PHP supports SFTP. You need to install ssh2 extension,

http://www.php.net/manual/en/book.ssh2.php

情绪 2024-09-10 22:31:17

如果应用程序是唯一需要 SSH 的东西,那么您可以立即排除 javascript。在这些环境中,它主要是一种客户端语言。

您可能喜欢 Net::SSH ruby​​ 库,或者我确信有一个 php 等效项。我使用过 Net:SSH,它相当简单。

If the application is the only thing that needs to SSH then you can rule out javascript immediately. It's predominately a client-side language in these environments.

You may like at Net::SSH ruby library, or I'm sure there's a php equivalent. I have used Net:SSH and it's fairly straight forward.

不再见 2024-09-10 22:31:17

您需要编写一个服务器端脚本来连接到 SFTP 服务器并将图像转发到客户端。

You need to write a server-side script that connects to the SFTP server and forwards the image to the client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文