This commit is contained in:
Looly
2022-05-18 10:24:00 +08:00
parent 4ed32622cb
commit 9d563648b7
2 changed files with 3 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ public class SshjSftp extends AbstractFtp {
this.ssh = new SSHClient();
ssh.addHostKeyVerifier(new PromiscuousVerifier());
try {
ssh.connect(ftpConfig.getHost());
ssh.connect(ftpConfig.getHost(), ftpConfig.getPort());
ssh.authPassword(ftpConfig.getUser(), ftpConfig.getPassword());
ssh.setRemoteCharset(ftpConfig.getCharset());
this.sftp = ssh.newSFTPClient();