java.io.IOException: com.jcraft.jsch.JSchException: channel is not opened. 解决方案
最近工作中遇到 channel is not opened 这个报错,网上的资料基本上是如下三种方案:1、设置超时时间:session.setTimeout(60000);这个方案没试直接否了。2、调整 /etc/ssh/sshd_config 配置文件的 MaxSessions,原来是10,改成了20,并去掉了“#”符号,保存后重启。没解决。3、释放linux内存。1、free -m2、sync
·
最近工作中遇到 channel is not opened 这个报错,
网上的资料基本上是如下三种方案:
1、设置超时时间:
session.setTimeout(60000);
这个方案没试直接否了。
2、调整 /etc/ssh/sshd_config 配置文件的 MaxSessions,原来是10,改成了20,并去掉了“#”符号,保存后重启。
没解决。
3、释放linux内存。
1、free -m
2、sync
3、echo 3 > /proc/sys/vm/drop_caches
没解决。
=========================================================================
最后调整 /etc/ssh/sshd_config 配置文件的 GSSAPIAuthentication 和 UsePAM 为no,解决。
更多推荐
已为社区贡献1条内容
所有评论(0)