add test and add methods

This commit is contained in:
Looly
2022-06-12 21:54:33 +08:00
parent 895a1448cf
commit c5ab974441
4 changed files with 28 additions and 2 deletions

View File

@@ -127,6 +127,7 @@ public class JschUtil {
* @param passphrase 私钥文件的密码可以为null
* @param timeOut 超时时间,单位毫秒
* @return SSH会话
* @since 5.8.4
*/
public static Session openSession(String sshHost, int sshPort, String sshUser, String privateKeyPath, byte[] passphrase, int timeOut) {
final Session session = createSession(sshHost, sshPort, sshUser, privateKeyPath, passphrase);

View File

@@ -31,7 +31,7 @@ import java.util.Vector;
*
* <p>
* 此类为基于jsch的SFTP实现<br>
* 参考https://www.cnblogs.com/longyg/archive/2012/06/25/2556576.html
* 参考:<a href="https://www.cnblogs.com/longyg/archive/2012/06/25/2556576.html">https://www.cnblogs.com/longyg/archive/2012/06/25/2556576.html</a>
* </p>
*
* @author looly