Ubuntu – Hot to Change a SSH host key?

Follow these steps to regenerate OpenSSH Host Keys

  1. Delete old ssh host keys:
rm /etc/ssh/ssh_host_*
  1. Reconfigure OpenSSH Server:
dpkg-reconfigure openssh-server
  1. Update all ssh client(s) ~/.ssh/known_hosts files