M BUZZ CRAZE NEWS
// news

dpkg-reconfigure on CentOS (for openssh_server)

By Jessica Wood

Systems that use the apt packaging system have access to a command called dpkg-reconfigure which, depending on the package, re-runs some setup commands.

At least on Ubuntu, it's possible to regenerate the SSH daemon keys in one shot by removing them from /etc/ssh, and running dpkg-reconfigure openssh-server. This causes the first-time setup that normally builds the keys when the daemon is installed to be reinvoked. A very handy shortcut when doing automated installs!

Now, I understand that all that this process is doing is a number of ssh-keygen commands in the background, but that's not what I'm asking here. What I want to know is: Is there an equivalent one-shot command on RPM based systems like CentOS to do the same reconfiguration?

1 Answer

CentOS is using RPM and might trigger post/pre-update/install scripts. But as your mentioned example for sshd, we use sshd-keygen service, which takes care of key generation during first start (and basically checks if the keys are in place before each start/restart of sshd daemon.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy