问题描述

用jsch包进行ssh登录的时候报这个错误:

com.jcraft.jsch.JSchException: Algorithm negotiation fail
    at com.jcraft.jsch.Session.receive_kexinit(Unknown Source)
    at com.jcraft.jsch.Session.connect(Unknown Source)
    at com.jcraft.jsch.Session.connect(Unknown Source)

解决方法

方法1

vim /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

重启sshd服务

service sshd restart

方法2

把响应的jsch包升级到0.1.53以上

<dependency><groupId>com.jcraft</groupId><artifactId>jsch</artifactId><version>0.1.53</version>
</dependency>

linux sftp连接报错:JSchException: Algorithm negotiation fail问题的解决方法相关推荐

  1. linux c 编译报错 Compile error : undefined reference to‘__atomic_fetch_add_4’ 解决方法

    代码如下: #include <opencv2/opencv.hpp> using namespace cv;int main() {Mat img=imread("cornea ...

  2. linux find命令 报错 遗漏"-exec"的参数 解决方法

    错误示例 find ./jquery-ui/ -name "*svn" -exec rm -rf {}\; 这样写会报错,"find: 遗漏"-exec&quo ...

  3. linux centos yum 报错 one of the configured repositories failed 解决方法

    目录 错误现象 解决方法 第一步 第二步 错误现象 One of the configured repositories failed (Unknown), and yum doesn't have ...

  4. 主机ssh升级到6.7以上版本后,使用jsch jar包ssh连接不上报Algorithm negotiation fail问题的解决办法

    文章目录 一. 解决方案 1. 添加加密算法 2. 升级版本 3. 回退版本 4. j2ssh.jar方式替代jsch 5. jsch版本下载列表 一. 解决方案 1. 添加加密算法 ssh连接问题是 ...

  5. jsch jar包连接不上ssh报Algorithm negotiation fail 错误

    1.jsch jar包连接不上ssh报Algorithm negotiation fail 错误 1 com.jcraft.jsch.JSchException: Algorithm negotiat ...

  6. Algorithm negotiation fail解决

    Algorithm negotiation fail 是JDk1.8的Strong encrytion的问题 具体方法见readme  --本人将解决问题的方式提供下载(http://download ...

  7. linux报错Loading mirror speeds from cached hostfile解决方法 【yum错误记录】

    linux报错Loading mirror speeds from cached hostfile解决方法 1.ping百度显示网络不可达 vim /etc/sysconfig/network-scr ...

  8. Python使用pip安装报错ModuleNotFoundError: No module named ‘pkg_resources‘的解决方法

    Python使用pip安装报错ModuleNotFoundError: No module named 'pkg_resources'的解决方法   大家好,我叫亓官劼(qí guān jié ),在 ...

  9. 导入sql文件报错:MySQL server has gone away 以及解决方法

    项目场景: 导入sql文件报错:MySQL server has gone away 以及解决方法 问题描述: 在我们使用mysql导入大文件sql时可能会报MySQL server has gone ...

  10. mysql 报错 get error 28 from storage engine 解决方法

    mysql 报错 get error 28 from storage engine 解决方法 参考文章: (1)mysql 报错 get error 28 from storage engine 解决 ...

最新文章

  1. django 设置外键_django2.0前后版本定义外键和一对一关系的差别
  2. c语言,字符串原地翻转
  3. linux中rpm命令管理
  4. 小师妹学JVM之:Dirty cards和PLAB
  5. 关于区块链,程序员需要了解什么
  6. php用wordanalysis抓取姓名_利用vba查询/抓取 外部数据
  7. Redis工作笔记-List类型
  8. ActiveMQ消息队列的使用
  9. 2021李宏毅机器学习课程笔记——Auto Encoder
  10. AI人才平均月薪3万,最赚钱岗位出炉;上海人才吸引力跌至第四
  11. button加下划线
  12. Spring关于@required注解
  13. bit,byte,b,B,KB的整理
  14. XSS篇——javascript:伪协议
  15. 思维导图使用技巧:手把手教你怎么画思维导图 #CSDN博文精选# #系统化学习# #IT技术# #知识图谱#
  16. 学计算机ps是什么,学PS电脑绘画要掌握什么呢?
  17. 蜜蜂在挡板外和框梁顶造赘脾的几个要素及处理方法
  18. ps还原上一步快捷键,ps还原上一步快捷键_photoshop恢复上一步操作的快捷键是什么...
  19. 人工智能-动物识别系统
  20. Linux课程设计石头剪刀布,课程设计-石头剪刀布程序.doc

热门文章

  1. 导航条UINavigtionBar,标签栏UITabBarController,抽屉MMDrawerController
  2. c语言采用牛顿迭代法求解一元三次方程,使用牛顿迭代法求根 一元三次方程的根...
  3. elementui二维表动态渲染
  4. QQ空间美化高仿认证PS动态皮肤背景音乐添加快速聊天
  5. ubuntu环境下文件夹压缩与解压缩
  6. 计算机毕业设计情况进展记录表,南京理工大学泰州科技学院毕业设计(论文)进展情况记录表.doc...
  7. 基于FPGA的光纤数据传输
  8. Excel 数据透视表教程大全之 03 刷新数据、添加多个字段作为值字段、值显示为总数的百分
  9. 96309245通讯异常工行_工商银行信息代码 96309245 是什么意思
  10. 提高非参数检验功效的潜在方法