Instead of doing something like this, it's often actually simpler and easier to manage if you use the built-in ssh certificate feature. Check out <a href="https://www.digitalocean.com/community/tutorials/how-to-create-an-ssh-ca-to-validate-hosts-and-clients-with-ubuntu" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-crea...</a> for an example of how to do that.<p>Now, no one has to remember to push the keys whenever something changes, <i>and</i> you no longer get spurious host key messages.