1
0
mirror of https://gitee.com/dromara/hutool.git synced 2025-04-05 17:37:59 +08:00
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
CHANGELOG.md
hutool-extra/src/main/java/cn/hutool/extra/ssh

View File

@ -3,10 +3,11 @@
-------------------------------------------------------------------------------------------------------------
# 5.8.2.M1 (2022-05-16)
# 5.8.2.M1 (2022-05-18)
### 🐣新特性
### 🐞Bug修复
* 【extra 】 修复SshjSftp初始化未能代入端口配置问题issue#2333@Github
-------------------------------------------------------------------------------------------------------------

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();