Reactivate old SSH host key types

Problem: ssh rejects connecting to old servers with this error:

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

Discussion: After upgrading your client operating system, the new installed openssh-client disabled some old ssh key types, but you can enable them with command line options or in ssh_config.

Solution 1: Add a command line option:

# ssh -oHostKeyAlgorithms=+ssh-rsa SRV

Solution 2: Add a line to your config file /etc/ssh/ssh_config

Host *
   HostKeyAlgorithms=+ssh-rsa

You can add a “Host” section for the specific host that needs old ssh key types.