How to I make an SSH connection?

Some Mac users have discovered that SSH is not working on their Mac since updating to macOS Ventura 13 or newer, including Sonoma. Typically you will see a “no matching host key type found. Their offer: ssh-rsa“ or “kex_exchange_identification: Connection closed by remote host” when this occurs.

The cause 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 allowing for RSA signatures.

You can also refer to this post. My SSH connections are failing with kex_exchange_identification