Score:2

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

kn flag

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?

Score:2
zw flag

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
grabbag avatar
kn flag
Thank you N0rbert for your solution. I tried it but it complained: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 43 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for openssh-server:amd64
grabbag avatar
kn flag
if i drop --reinstall, i get the error Not replacing deleted config file /etc/ssh/sshd_config dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 1 –
Score:1
re flag

try

sudo apt-get purge openssh-server

it works for me:)

To purge a package means to delete it and its configuration files

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.