Algorithm Negotiation failed when trying to connect to server
I installed openssh-server
in Ubuntu server 16.04
and in /etc/ssh/ssh_config
I added:
MaxAuthTries 3
PasswordAuthentication YES
and then restarted the ssh server. When I try to connect from a a different pc with ssh I get a message
Algorithm Negotiation failed
back in server, when I run systemctl status ssh
I get this error
Unable to negotiate with 192.168.0.132 port 63428: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
I edit the /etc/ssh/sshd_config
add I add the line
KexAlgorithms=+diffie-hellman-group1-sha1
and now I get a different error, when I run the systemctl status ssh
Unable to negotiate with 192.168.0.132 port 63428: no matching key exchange method found. Their offer: aes128-cbc,3des-cbc, blowfish-cbc,cast128-cbc,twofish-cbc,arcfour [preauth]
You are connecting to new system (Ubuntu 16.04) from some very old SSH client that does not support any contemporary algorithms and this is a reason why it fails to connect. You should really update your client.
Or continue enabling the outdated protocols that might not be secure today. Using
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc
you should be able to connect.
Add below code into file: /etc/ssh/sshd_config
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc
Now restart Service