Clone a VM or an SD card image and every copy has the same SSH host keys. Your client cannot tell them apart, and anyone with one copy can pretend to be the others.
ssh-keygen -A creates every default host key type that does not exist yet. So on the clone, you remove the old keys first and then let it fill the gaps:
sudo rm /etc/ssh/ssh_host_*
sudo ssh-keygen -A
sudo systemctl restart ssh
Be careful here. The rm deletes the server’s identity, so do this from the console of the VM, or at least keep your current session open until the restart worked. If sshd starts without host keys, it refuses connections.
The man page says the keys get the default path, an empty passphrase and default sizes, which is what host keys need. The -f option sets a prefix for the path, which I find handy to try it in a temp folder first:
mkdir -p /tmp/hk/etc/ssh && ssh-keygen -A -f /tmp/hk
Afterwards every client that knew the old key will warn that the host key changed. That is expected, so remove the old entry with ssh-keygen -R and accept the new fingerprint after checking it on the console. Some distributions generate missing keys at first boot anyway, which is why deleting them before you make a template image is also a good habit.
Further reading: ssh-keygen man page