layout: post
title: ssh链接报错 Unable to negotiate with IP
categories: linux,sshd,ssh
description: matching,ssh

keywords: ssh, matching

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

介绍

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

解决方案

The version of OpenSSH included in 16.04 disables ssh-dss. There’s a neat page with legacy information that includes this issue: http://www.openssh.com/legacy.html
In a nutshell, you should add the option -oHostKeyAlgorithms=+ssh-dss to the SSH command:

ssh -oHostKeyAlgorithms=+ssh-dss root@182.158.68.5  

成功登录

➜  ~ ssh -oHostKeyAlgorithms=+ssh-dss root@182.158.68.5  
The authenticity of host '182.158.68.55 (182.158.68.5)' can't be established.  
DSA key fingerprint is SHA256:LVWhbgb8q5TdW2QEsFjOVNp8ekW8UqPVE/KCbMOI4CM.  
Are you sure you want to continue connecting (yes/no)?  

   留言:

验证成功!
请输入内容!
验证成功!
请输入内容!