If you frequently SSH into network management devices, such as routers and switches, you may notice that in macOS 10.12, it doesn't work anymore.
There are two error message you'll need to fix:
- Unable to negotiate with X.X.X.X port 22: no matching host key type found. Their offer: ssh-dss
- Corrupted MAC on input. Connection to X.X.X.X closed by remote host.
Both errors are fixed by modifying the SSH config file. The fix follows:
In terminal, issue: sudo nano /etc/ssh/ssh_config
Enter your password and hit enter
1. Scroll down until you see this line:
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
2. Delete the pound sign, which will un-comment that line and make it active.
3. Now scroll down to the bottom of the document and add this line:
HostkeyAlgorithms ssh-dss
4. Hold Control and hit X to exit, hit Y to save, and Enter to apply.
That should do it!