Al connectar a un servidor SSH, surt el següent error:

Unable to negotiate with 172.20.8.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

ssh root@172.20.8.1 -o KexAlgorithms=diffie-hellman-group1-sha1

Unable to negotiate with 172.20.8.1 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

Això passa per que la versió del servidor es molt vella i les noves versions del openssh ja no ofereixen aquests algoritmes, per questions de seguretat.

Per connectar es pot afegir -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa al comanda ment de la crida, per exemple:

ssh root@172.20.8.1 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa

o afegir les línies al /etc/ssh/ssh_config

HostKeyAlgorithms = +ssh-rsa<br>PubkeyAcceptedAlgorithms = +ssh-rsa