How to manage ssh host keys
Linux saves the ssh host keys in ~/.ssh/known_hosts. You can manage these ssh host keys with the command ssh-keygen.
Search for a specific host (in known_hosts):
ssh-keygen -F HOSTNAME
Remove a specific host:
ssh-keygen -R HOSTNAME
To add a new ssh host key you can use ssh-keyscan. This command print the ssh host key on the stdout. So we have to append this key to the known_hosts file.
ssh-keyscan -H HOSTNAME >> ~/.ssh/known_hosts