Regenerating SSH Host Keys
If you need to regenerate the SSH Host keys on a system, such as after you clone an Linux system and want to make the new clone unique, you can use the following commands to regenerate the system SSH host keys.
Remove Current SSH Host Keys
#Remove current SSH Host Keys
sudo /bin/rm -v /etc/ssh/ssh_host_*
Regenerate SSH Host Keys
#Regenerate SSH Host Keys
sudo dpkg-reconfigure openssh-server
The next time you SSH into the machine, you will see that it is presenting to you a different host key.