ColdFusion版本9安全FTP - 无法连接

时间:2016-01-13 19:07:00

标签: coldfusion ftp sftp coldfusion-9 ftps

我希望自动化当前正在手动完成的任务。使用ftp客户端Filezilla执行手动过程。这些是说明:

In the Host field, type in the IP address: xx.xxx.xxx.xxx.
In the Port field, type in 990.
In the Servertype dropdown list, change it so that it reads 
 FTP over SSL/TLS (implicit encryption). (NOTE: On the Mac OSX 
 version this option will read FTPS – FTP over implicit TLS/SSL).
In the Logontype area, select Normal.
In the Username field, enter your username.
In the Password field, enter your password.

当我按照这些说明操作时,我连接成功。这是我在ColdFusion中尝试过的:

<cfftp action="open"
connection="abc"
secure = true
server="something valid"
port="990"
username="something valid" 
password="something valid">

这是错误消息:An error occurred while establishing an sFTP connection. Verify your connection attributes: username, password, server, fingerprint, port, key, connection, proxyServer, and secure (as applicable). Error: Session.connect: java.net.SocketTimeoutException: Read timed out.

当我删除端口attibute时,结果不变。当我将用户名更改为无效的用户名时,我会收到一个略有不同的错误:An error occurred while establishing an sFTP connection. Verify your connection attributes: username, password, server, fingerprint, port, key, connection, proxyServer, and secure (as applicable). Error: connection is closed by foreign host.

换句话说,超时被故意关闭所取代。

为了解决这个问题,我应该注意什么?

1 个答案:

答案 0 :(得分:4)

您在Filezilla中创建FTPS连接,而ColdFusion 9没有FTPS的本机支持,只有SFTP。感谢abbottmw answer我过去能够创建一个显式FTPS连接。 ColdFusion 9附带Apache Commons库,您可以使用FTPSClient在Java级别创建连接。