Solved: Error: Unable to negotiate with — port 22: no matching host key type found. Their offer: ssh-dss ?

In this article, we will see a common error message and its resolution.

I. Error Message

ngeaix001 saket $ ssh Administrator@10.254.0.56
Unable to negotiate with 10.254.0.56 port 22: no matching host key type found. Their offer: ssh-dss
ngeaix001 saket $

Here we can see when we try to do ssh on an address, it says, not able to negotiate with matching host key.
It means the host key is different on the target server and its shown ssh-dss.

 

II. Solution
Hence we need to connect by sending ssh-dss key pair.
We can achieve this by changing our key algorithm while doing ssh like below.

ngeaix001 saket $ ssh -oHostKeyAlgorithms=+ssh-dss Administrator@10.254.0.56
Administrator@10.254.0.56's password:
User:Administrator logged-in to NGEAIX9-rb.ngel.linux.net(10.254.0.56 / FE80::2A92:4AFF:FE34:AC18)
iLO 3 Advanced 1.82 at  Jan 15 2015
Server Name: NGEAIX9
Server Power: On

</>hpiLO->

Hence now we are able to connect with the server and issue is now resolved.

4.3 3 votes
Article Rating
Subscribe
Notify of
guest

4 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Harsh
Harsh
1 year ago

still not working

 ssh -oHostKeyAlgorithms=+ssh-dss 149.130.1.5
command-line line 0: Bad protocol 2 host key algorithms ‘+ssh-dss’.
[hs103@junco ~]$

patterson
patterson
2 years ago

thanks a lot! You saved me man.

Mohit
Mohit
2 years ago

Informative content