messed up sshd_config, so removed openssh-server, installed openssh-server, Not replacing deleted config file /etc/ssh/sshd_config

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

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

You Might Also Like