Regenerate SSH config on OpenSUSE

mlanner

Renowned Member
Apr 1, 2009
190
1
83
Berkeley, CA
This may not be the right place for this question, but I figured I'll try anyway.

I've built an OpenSUSE image that I want to use as a base image with the intention of "cloning" it over and over. Obviously, I want to regenerate the SSH config and recreate new keys for security reasons.

I know how to regenerate the SSH config on Debian/Ubuntu:

rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server

Does anyone know what the equivalent command to dpkg-reconfigure is on OpenSUSE?

Thanks in advance.
 
Last edited:
I found the answer elsewhere. AFAIK at this point there is no dpkg-reconfigure equivalent in openSUSE. The way to do it is to simply run:

rm /etc/ssh/ssh_host_*

... and then restart the VM. sshd automatically regenerates keys if there are none in /etc/ssh/.