Ubuntu – Hot to Change a SSH host key?

Follow these steps to regenerate OpenSSH Host Keys

  1. Delete old ssh host keys:
<code>rm /etc/ssh/ssh_host_*</code>Code language: HTML, XML (xml)
  1. Reconfigure OpenSSH Server:
<code>dpkg-reconfigure openssh-server</code>Code language: HTML, XML (xml)
  1. Update all ssh client(s) ~/.ssh/known_hosts files