How to fix OpenWRT SSH Unable to negotiate with ... no matching host key type found. Their offer: ssh-rsa

Problem:

When using a modern Linux client to connect with an OpenWRT device using SSH, you an error message like the following:

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

Solution

You can explicitly tell SSH to allow ssh-rsa by using -oHostKeyAlgorithms=+ssh-rsa, for example:

ssh -oHostKeyAlgorithms=+ssh-rsa [email protected]

Using this command should allow you to connect to your OpenWRT device.