On the RHEL 8 and previous it is usual, that the SSH host keys in /etc/ssh
are generated automatically by sshd
service when missing. Usually there should be:
/etc/ssh/ssh_host_ecdsa_key
/etc/ssh/ssh_host_ecdsa_key.pub
/etc/ssh/ssh_host_ed25519_key
/etc/ssh/ssh_host_ed25519_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
Restart of the node or even systemctl restart sshd
should be sufficient.
But as of the minor version RHEL 8.7 this may not work any more and the sshd
crashes complaining about missing host keys in the journal log. Why? How can I solve this?