Regenerating open ssh host keys for ubuntu/debian

Often after you clone a linux VM with open ssh server installed - the ssh keys generated at the time open ssh server was installed are copied over and you might have problems sshing to that machine.

To regenerate the host keys -

# rm /etc/ssh/ssh_host_*
# dpkg-reconfigure openssh-server
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...

That is it.