我无法通过 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();