| 程序包 | 说明 |
|---|---|
| cn.hutool.extra.ssh |
Jsch封装,包括端口映射、SFTP封装等,入口为JschUtil
|
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
JschUtil.bindPort(com.jcraft.jsch.Session session,
String remoteHost,
int remotePort,
int localPort)
绑定端口到本地。
|
static int |
JschUtil.openAndBindPortToLocal(Connector sshConn,
String remoteHost,
int remotePort)
打开SSH会话,并绑定远程端口到本地的一个随机端口
|
Copyright © 2018. All rights reserved.