After I updated from Ubuntu 20.04 to 22.04, ssh-ing into my web-host via key-auth yielded this odd error:

scp A-FILE $HOST:
Unable to negotiate with $HOST port 22:
  no matching host key type found. Their offer: ssh-rsa,ssh-dss

A bit of googling showed other folks having the same problem fixed it the following way:

  • Add these lines at the top of .ssh/config
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
  • For each host in .ssh/config that complains when you ssh or scp:
host $HOST
    hostname $HOST.com
    user $USER
    HostKeyAlgorithms +ssh-rsa,ssh-dss