kex_exchange_identification: read: Connection reset by peer
When connecting to Ubuntu 20.04 server using SSH from a Mac computer, get an error
1 |
kex_exchange_identification: read: Connection reset by peer |
On checking the servers log file (/var/log/auth.log), found the following error message
1 |
Jul 23 06:53:34 server sshd[24147]: Unable to negotiate with 17.19.44.24 port 47280: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth] |
To fix this, on the server, edit sshd_config
1 |
vi /etc/ssh/sshd_config |
At end of the file, add
1 |
KexAlgorithms +diffie-hellman-group1-sha1 |
Restart ssh
1 |
systemctl restart ssh |
See SSH