JSch 0.1.53 session.connect() throws “End of IO Stream Read”

孤人 提交于 2019-11-29 09:42:14

The JSch 0.1.53 supports (and prefers) the diffie-hellman-group-exchange-sha256 KEX, what the server claims to support too, so the JSch tries to use it.

For some reason the server disconnects you afterwards.

To workaround that, force the JSch to use the diffie-hellman-group1-sha1 KEX, what the JSch 0.1.52 prefers:

session.setConfig("kex", "diffie-hellman-group1-sha1"); 

I had an same problem i just changed the jsch version to 0.1.54 and got solved

add this to your pom.xml

<dependency>
   <groupId>com.jcraft</groupId>
   <artifactId>jsch</artifactId>
   <version>0.1.54</version>
</dependency>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!