Tuesday, June 21, 2016

macOS 10.12 Sierra - Corrupted MAC on input && No matching host key type

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!



macOS 10.12 Sierra - Flush DNS

On macOS 10.12 Sierra, flushing DNS uses the same commands as 10.11 and previous.


To flush your DNS on macOS 10.12 Sierra, issue this command in terminal:

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed 
At the prompt, enter your password and hit the enter key. When it's done flushing your DNS, it will say so.