Home     About Us     RSSRSS

MacOS Sierra: Unable to negotiate with IP X.X.X.X port 22 no matching host key type found. Their offer: ssh-dss

May 22, 2017 by @HKw@! | Filed under centos, Linux, Mac OS X.

Issue

My latest MacOS X 10.12 release failed to ssh to network devices with the following error:

techkaki-MacBook-Pro:~ techkaki$ ssh root@10.10.10.243
Unable to negotiate with 10.10.10.243 port 22: no matching host key type found. Their offer: ssh-dss

Root Cause

OpenSSH Version 7 and above disable DSA key by default.

Solution

A) To enable the ssh-dss (DSA) key exchange algorithm  using the HostKeyAlgorithms option:

ssh -o HostKexAlgorithms=+ssh-dss  aimsadm@10.10.10.82

B) Enable ssh-dss (DSA) on ssh_config by adding HostkeyAlgorithms +ssh-dss at the end of the ssh_config file.

sudo nano /etc/ssh/ssh_config

Screen Shot 2017-05-22 at 11.54.31 AM

Hope this information will help 🙂

Reference link:-

https://www.openssh.com/legacy.html

← Previous

Leave a Reply

Your email address will not be published. Required fields are marked *