终端远程登录ssh时,提示如下错误:

Unable to negotiate with 192.168.2.53 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

由提示得知,ssh不能远程登录的原因为:没有找到相关的主机密钥类型。

1、确实是主机密钥类型不符合

2、不存在相关主机密钥类型

生成ssh_key

ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

重启ssh之后远程,问题依然存在

确认密钥已存在......

指定主机key算法(最后解决方案):

1、命令中加参数

ssh -o HostKeyAlgorithms=+ssh-dss user@host

2、在~/.ssh目录下添加config  

vi config

  在config中写入以下code:

Host *ServerAliveInterval 10HostKeyAlgorithms +ssh-dssPubkeyAcceptedKeyTypes +ssh-dss

3、重启ssh

systemctl restart sshd

Unable to negotiate with 192.168.2.53 port 22: no matching host key type found. Their offer: ssh-rsa相关推荐

  1. 【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh

    文章目录 问题 解决 问题 运行 git clone git@code.aliyun.com:project-main/project-name.git,报错如下: Cloning into 'pro ...

  2. Unable to negotiate with 123.4.47.238 port 29418: no matching host key type found. Their offer: ssh-

    Unable to negotiate with 123.4.47.238 port 29418: no matching host key type found. Their offer: ssh- ...

  3. 【已解决】Unable to negotiate with — port 22: no matching host key type found. Their offer: ssh

    标题 mac系统,想通过ssh连接,但出现以下报错:Unable to negotiate with 10.188.5.86 port 22: no matching host key type fo ...

  4. Unable to negotiate with 120.26.106.212 port 22: no matching host key type f

    原因是Terminal找不到支持的密钥交换方法,因为新版Openssh中认为SHA1这种hash散列算法过于薄弱,已经不再支持,所以我们需要手动去允许对于SHA1的支持 . 解决办法: 在生成公钥的~ ...

  5. Unable to negotiate with XXXX port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

    问题描述 代码仓库已经添加了ssh公钥之后,克隆代码到本地时就报了这个问题 执行命令 git clone git@xxxxxxxxxxxxx.git 不能正常clone代码,报错信息如下: Unabl ...

  6. ssh 连接报错:Unable to negotiate with 192.168.xx.xx port 22: no matching key exchange method found.

    用 ssh 连接 Linux 服务器时,很偶然的情况下出现了如下报错: Unable to negotiate with xx.xx.xx.xx port 22: no matching key ex ...

  7. Unable to negotiate with 192.168.7.203 port 22: no matching key exchange method found. Their offer:

    Unable to negotiate with xxxx port xxxx: no matching key exchange method found. Their offer: diffie- ...

  8. Git提示: Unable to negotiate with xxx.xxx.xxx.xxx port XX: no matching host key type found.

    解决: 前提: 在排除没有配置公钥的情况下. 在Git的安装目录下 Git > etc > ssh 文件夹下找到 ssh_config 文件,在文件末尾添加一下代码 Host *Hostk ...

  9. Unable to negotiate with xx.xx port xx: no matching host key type found. Their offer: ssh-rsa....

    背景 下载安装了官网最新的Git: 安装没问题,配置了name和email: 同时也配置了ssh秘钥到代码仓库: 使用git bash命令或者从idea中clone代码,报错如下: Unable to ...

最新文章

  1. HarmonyOS 实现跑马灯效果
  2. 今天收到IBM cat 测试
  3. linux mysql 升级_linux升级mysql
  4. 华为--PPP典型配置举例
  5. javaScript 验证码代码
  6. VTK:点定位器用法实战
  7. 利用putty的pscp命令执行Linux服务器命令
  8. 三、深度学习框架Tensorflow
  9. linux硬盘为啥分区,Linux下为什么要进行磁盘的分区
  10. HTML、CSS、JavaScript网页制作从入门到精通 (刘西杰) pdf扫描版彩色版​
  11. Python pip安装报错及解决办法:is not a supported wheel on this platform
  12. python怎么画散点图_用python画xy散点图
  13. 最简单华为设备怎么无需Root激活XPOSED框架
  14. UVa10653.Prince and Princess
  15. 我的子平真诠学习笔记
  16. 【C数据类型】基本数据类型
  17. 网闸、防火墙、保垒机
  18. java外包恒大,JAVA开发工程师
  19. Python Monte Carlo K-Means聚类实战研究
  20. eksctl 部署AWS EKS

热门文章

  1. 计算机题库一级第四,计算机一级题题库,第四章Excel
  2. PyCharm导入库
  3. 软银巨资收购ARM:这是场天作之合?
  4. Lind.DDD.SSO单点登陆组件的使用(原创)
  5. 基于javaweb+mysql的学生在线选课系统(管理员、教师、学生)
  6. 图片或手写签名转电子签名教程
  7. C语言经典算法100例-结束语
  8. openssl:Can‘t load /home/test/.rnd into RNG
  9. ASEMI-MB6S贴片整流桥参数MB6S
  10. javascript数据类型边边角角