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 [email protected]

成功登录

➜  ~ ssh -oHostKeyAlgorithms=+ssh-dss [email protected]
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)?