Unable to negotiate with xxxxport 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
Posted 格格巫 MMQ!!
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to negotiate with xxxxport 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss相关的知识,希望对你有一定的参考价值。
操作环境: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
1
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_keyssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
重启ssh之后远程,问题依然存在
确认密钥已存在…
网络搜索中…
指定主机key算法(最后解决方案):
1、命令中加参数
1
ssh -o HostKeyAlgorithms=+ssh-dss user@host
方法一:执行 ssh 指令时增加参数
ssh -oHostKeyAlgorithms=+ssh-dss user@legacyhost
user@legacyhost 替换成自己的服务器登录名及登录地址
2、在~/.ssh目录下添加config
1
vi config
在config中写入以下code:
1
2
Host *
HostKeyAlgorithms +ssh-dss
3、重启ssh
1
service ssh restart
Login success !!!
以上是关于Unable to negotiate with xxxxport 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss的主要内容,如果未能解决你的问题,请参考以下文章
记录Git Unable to negotiate with xxx... 问题
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(
SSH_Unable to negotiate with 192.168.1.152 port 22: nomatching host host key type found. Their offer
Unable to negotiate with xxxxport 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
Unable to negotiate with XXXX port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
fiddler 502 System.Security.SecurityException Failed to negotiate HTTPS connection with server.fid