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

问题描述

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

# ssh loneferret@192.168.140.146
Unable to negotiate with 192.168.140.146 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  loneferret@192.168.140.146 

 

posted @ 2022-04-05 12:50  Jason_huawen  阅读(19409)  评论(1编辑  收藏  举报