Session.connect:java.io.IOException:End of IO Stream Read
eclipse 出现这样的问题,打开日志查看是 com.jcraft.jsch.JSchException
异常,根本原因是 eclipse 的 git 插件不支持新版 ssh,插件代码中缺少session.setConfig("kex",“diffie-hellman-group1-sha1”);
,意思就是 ssh server 不支持过时的diffie-hellman-group1-sha1
算法问题,解决办法是修改服务器 /etc/ssh/sshd_config
文件,在文件的最后面添加以下内容,让 open-ssh server 支持过时的算法,
KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
并重启 ssh 服务:service ssh restart