linux sftp连接报错:JSchException: Algorithm negotiation fail解决方案

1、解决方法1,将jsch的jar包升级到最新

2、在、/etc/ssh/sshd_config文件中最后添加一行秘钥:

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

原文地址:https://www.cnblogs.com/tiandi/p/12678334.html