2 min read

ssh unable to negotiate

My upgrade to Ubuntu LTS 22.04.1 from 20.04 was pretty smooth, but I ran into one issue. When I tried to ssh to a few other boxes around the network, I saw:

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

Looks like I need to upgrade my ssh server on some machines. But I canโ€™t do that if I canโ€™t ssh to them! So I added a couple of lines to my /etc/ssh/ssh_config instead:

HostKeyAlgorithms ssh-rsa,rsa-sha2-512,rsa-sha2-256
PubkeyAcceptedKeyTypes ssh-rsa,rsa-sha2-512,rsa-sha2-256

Iโ€™ll need to undo that once I fix the server, but until then I can log into it.