【发布时间】:2017-11-02 12:23:46
【问题描述】:
下面的代码我正在尝试使用FTPSClient 连接 SFTP 主机。我使用FTPSClient 代替FTP 客户端进行连接。但我面临连接问题。
public static void main(String[] args) throws SocketException, IOException {
String host ="sftphost.com";
String user = "abc";
String pwd = "pwd"
final FTPSClient ftp = new FTPSClient();
System.out.println("host:"+host);
ftp.connect(host,22);
int reply = ftp.getReplyCode();
ftp.login(user, pwd);
}
【问题讨论】:
标签: java sftp ftp-client ftps apache-commons-net