I messed up sshd_config and did not make a copy. So I removed openssh-server, then installed openssh-server. The installation complained with message.Not replacing deleted config file /etc/ssh/sshd_config
Any suggestions for how to reinstall openssh-server?
On ubuntu 18.04
Somehow microk8s and rcopy also got uninstalled when I removed openssh-server. yikes, completely unexpected side effect.
Is there a recovery mode of ubuntu 18.04 where it will fix things when they get this badly messed up?
1 Answer
You have to ask APT to replace the configuration file by using command below
sudo apt-get update
sudo apt-get -o Dpkg::Options::="--force-confask" install --reinstall openssh-server 2