How To Fix the “no hostkey alg” SSH Error Message on Older MacOSX

Author: , April 9th, 2025

The included, MacOSX-native ssh binary does not support newer SHA2 keys, so it gets the dreaded “no hostkey alg” or “kex_exchange_identification: read: Connection reset by peer” errors. To troubleshoot, check the sshd logs:

To fix that, install ssh via homebrew or macports and use that binary instead: