How to Fix SSH Not Working on MacOS Ventura
Some Mac users have discovered that SSH is not working on their Mac since updating to macOS Ventura 13 or newer. Typically they’ll see an error message when attempting to ssh into another server along the lines of “no matching host key type found. Their offer: ssh-rsa“.
The apparent reason for this issue is that the version of OpenSSH that ships with MacOS Ventura disables RSA signatures by default, thus you can resolve the problem by either using a more secure hash, or by simply allowing for RSA signatures. We’ll show you how to do the latter.
We’re going to use nano because it’s easy and user friendly, but you’re welcome to use vi/vim or whatever text editor of your choice.
How to Fix SSH Not Working with RSA Signatures on MacOS Ventura
We’re going to modify the ssh_config file to allow for RSA host key again, here’s how to do this.
Open the Terminal (via Spotlight or through the Utilities folder) and enter the following command string:
sudo nano /etc/ssh/ssh_config
You’ll need to authenticate with the admin password.
Scroll all the way to the bottom of the ssh_config file and then add the following lines to the bottom of ssh_config:
Hit Control+O to save, and Control+X to exit.
Try using SSH to connect to a server with RSA keys again, it should work as intended.
While you’re at the command line, you can always enable ssh from Terminal as well if you’d like, allowing for inbound ssh connections to your Mac. For example, maybe you want to remotely access your Mac from the command line from an iPad or another computer, and this would allow for that.
This error can appear even after confirming that SSH is turned on for MacOS, which shouldn’t have any impact on outbound ssh connections anyway, but some users report has resolved their difficulties so try that too, and obviously that would make a difference if the computer you’re trying to connect to is a Mac running SSH, since some Mac users have found that SSH is disabled by default in MacOS Ventura even if it was enabled previously before they updated system software.