From 586b8d2c85ffdf2936c23610ac6d1603087f9b90 Mon Sep 17 00:00:00 2001 From: Looly Date: Wed, 18 May 2022 10:38:40 +0800 Subject: [PATCH] fix bug --- hutool-extra/src/main/java/cn/hutool/extra/ssh/SshjSftp.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hutool-extra/src/main/java/cn/hutool/extra/ssh/SshjSftp.java b/hutool-extra/src/main/java/cn/hutool/extra/ssh/SshjSftp.java index 366ced51b..e07d08731 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/ssh/SshjSftp.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/ssh/SshjSftp.java @@ -25,7 +25,7 @@ import java.util.List; * *

* 基于sshj 框架适配。
- * 参考:https://github.com/hierynomus/sshj + * 参考:https://github.com/hierynomus/sshj *

* * @author youyongkun @@ -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();