SSH登录时“no matching host key type found. Their offer: ssh-rsa,ssh-dss“的错误解决方法

问题描述

在利用SSH登录某目标时,出现下述报错:

ssh root@192.168.2.235
Unable to negotiate with 192.168.2.235 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
解决方案

之所以报错是因为OpenSSH 7.0以后的版本不再支持ssh-dss (DSA)算法,解决方法是增加选项-oHostKeyAlgorithms=+ssh-dss,即可成功解决

ssh -oHostKeyAlgorithms=+ssh-dss root@192.168.2.235

发表回复

京ICP备15027918号-1