MacBook bad cipher for SSH

MacOS is somewhat restrictive on accesting SSH key types and key exchange. If you need to connect to i.e. Cisco switches your Macbook might not accept it. To fix it do as follows.

sudo vi /etc/ssh/ssh_config


Locate the “Host *” section.

#"no matching host key type found"... add offer here

#”no matching key exchange method found”… add offer here
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1

The key types and exchanges above is the one I use. You might need to add more or others.