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.
If you are managing enough servers to justify automating the deployment SSH keys, you probably also have configuration management.<p>Why would you use this rather than your existing configuration management system? The latter reuses existing infrastructure and is naturally more concurrent and scalable.<p>I get this is a push mechanism and configuration management is generally pull-based, alternatively tools like Ansible exist which can perform the same task and then some.