When setting up an
sshd daemon and generating a host key with
ssh-keygen -A what options are best practice to add?
How do I remove keys which may have already been auto-generated with sub-optimal options?
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
You can safely remove the keys stored in /etc/ssh, generate new keys and restart sshd. There is nothing more to it than that.
But please note that every client that have the old key stored in their known_hosts file will complain. You will need to remove that record from your clients. This can be done using
ssh-keygen -R <hostname>