MacOS SSH Error ‘No Matching Exchange Method Found’

if you face this issue on your mac when trying to connect through SSH:
No Matching Exchange Method Found

…then you have to enable SHA1 in your OpenSSH on MacOS:

sudo vim /etc/ssh/ssh_config

1. uncomment these lines (remove the # at the beginning of the line):

#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,hmac-sha2-256,umac-64@openssh.com,hmac-ripemd160

2. and add these lines at the end of the file:

HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1

In the end, it should look like this: