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

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?

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

cURL has SFTP support.

PHP supports SFTP. You need to install ssh2 extension,

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

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.