【发布时间】:2016-07-18 02:40:31
【问题描述】:
我无法通过 TLS/SSL (FTPS) 服务器连接到 FTP。我正在使用 SimpleFTP 库,因为我能够在没有 SSL 的情况下连接 FTP 服务器,但无法连接 FTPS。
它在第 2 行 (ftp.connect) 给了我这个错误,
SimpleFTP 在连接 FTP 服务器时收到未知响应:
220--------- 欢迎使用 Pure-FTPd [privsep] [TLS] ----------
我正在使用下面的代码
SimpleFTP ftp = new SimpleFTP();
// Connect to an FTP server on port 21.
ftp.connect("xxx.xxx.xxx.xxx", 21, "username", "pwd");
//getting error at (ftp.connect) above line
// Set binary mode.
ftp.bin();
// Change to a new working directory on the FTP server.
ftp.cwd("web");
ftp.disconnect();
【问题讨论】: