This script regenerates the SSH host keys on a newly, template created, VM
Add the full path of the script in /etc/rc.local, just above exit 0.
exit 0