0
下面的代碼我試圖連接使用FTPSClient
SFTP主機。而不是FTP客戶端,我使用FTPSClient
進行連接。但我正面臨連接問題。與FTPSClient SFTP連接失敗
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);
}