当前位置:   article > 正文

SSH_Unable to negotiate with 192.168.1.152 port 22: nomatching host host key type found. Their offer...

unable to negotiate with 192.168.1.1 port 8022: no matching host key type fo

操作环境:Kali Linux 

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

Unable to negotiate with 192.168.1.152 port 22: nomatching host host key type found. Their offer: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 *
    HostKeyAlgorithms +ssh-dss

3、重启ssh

service ssh restart

  

Login success !!!

转载于:https://www.cnblogs.com/VkeLixt/p/9978997.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/221867
推荐阅读
相关标签
  

闽ICP备14008679号