How to: Ubuntu / Debian Linux Regenerate OpenSSH Host Keys

Posted on in Categories , , , , , , last updated February 16, 2017

How do I regenerate OpenSSH sshd server host keys stored in /etc/ssh/ssh_host_* files? Can I safely regenerate ssh host keys using remote ssh session as my existing ssh connections shouldn’t be interrupted on Debian or Ubuntu Linux? How do I regenerate new ssh server keys?