当前位置: 首页 > news >正文

新版ssh客户端无法连接旧版服务器sshd的方法

新安装完的windows 版本,连Linux服务器直接报错

C:\Users\wang>ssh root@192.168.110.50
Unable to negotiate with 192.168.110.50 port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,kexguess2@matt.ucc.asn.au

这是密钥交换算法不匹配,服务器是较老的、已经被淘汰的算法(diffie-hellman-group14-sha1、diffie-hellman-group1-sha1),而ssh客户端版本较新,禁用了这些不安全的算法。

解决办法:启用不推荐的密钥交换算法:-o KexAlgorithms=+diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

C:\Users\wang>ssh -o KexAlgorithms=+diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 root@192.168.110.50
Unable to negotiate with 192.168.110.50 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

又报错了,新版ssh客户端无法匹配服务器的旧版密钥类型(ssh-rsa,ssh-dss)

解决办法:启用不推荐的密钥类型 -o HostKeyAlgorithms=+ssh-rsa,ssh-dss

C:\Users\wang>ssh -o KexAlgorithms=+diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-rsa,ssh-dss root@192.168.110.50
Unable to negotiate with 192.168.110.50 port 22: no matching MAC found. Their offer: hmac-sha1,hmac-md5

还是报错,新版ssh客户端无法匹配服务器的消息认证码(MAC)算法。

解决办法:启用不推荐的MAC算法 -o MACs=+hmac-sha1,hmac-md5

C:\Users\wang>ssh -o KexAlgorithms=+diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-rsa,ssh-dss -o MACs=+hmac-sha1,hmac-md5 root@192.168.110.50
sign_and_send_pubkey: no mutual signature supported
root@192.168.110.50's password:

终于可以连了


http://www.mrgr.cn/news/33119.html

相关文章:

  • 【学习笔记】手写Tomcat 四
  • 《AI时代程序员核心竞争力提升指南》
  • C++ 构造函数最佳实践
  • AUTOSAR汽车电子嵌入式编程精讲300篇-基于CAN总线的气动控制
  • 【linux-Day4】linux的基本指令<下>
  • 网络丢包定位记录(三)
  • XXL-JOB环境搭建
  • github加速下载@powershell命令行内加速下载github资源@获取镜像加速后的链接
  • 【成品论文】2024年华为杯研赛E题25页高质量成品论文(后续会更新
  • 代码编辑器 —— Notepad++ 实用技巧
  • 51单片机——独立按键
  • 一个安卓鸿蒙化工具
  • 银河麒麟桌面操作系统V10(SP1)离线升级SSH(OpenSSH)服务
  • CompletableFuture的allOf一定不要乱用!血泪史复盘
  • 01-ZYNQ linux开发环境安装,基于Petalinux2023.2和Vitis2023.2
  • go 安装依赖超时
  • msvcp140.dll0丢失的解决方法,总结6种靠谱的解决方法
  • Spring Boot实战:使用策略模式优化商品推荐系统
  • 数据结构:内部排序
  • Spring Boot实战:使用@Import进行业务模块自动化装配