openssh-server noninteraction problem ubuntu 20

Asked by Dmitrijs Lahs

I'm running command:
```bash

export DEBIAN_FRONTEND=noninteractive
sudo apt upgrade -y -o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'

```
When it comes to openssh-server, it ignores this config and still asks what to do with config (keep old/replace with new)

Versions:

Openssh_server 1:8.2p1-4ubuntu0.4 ( trying to upgrade to 1:8.2p1-4ubuntu0.5 )

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Néstor A.C. (nestorac) said :
#1

I understand the problem that you suffer. Please, take a look here:

https://stackoverflow.com/questions/33370297/apt-get-update-non-interactive

I have not personally suffered this problem, but some people do.

Revision history for this message
Dmitrijs Lahs (kideg20) said :
#2

Thanks. I saw that post. They recommend to use -o Dpkg::Options::="--force-confold". But i'm already using it.

The only difference is that they use --force-yes. And it's deprecated:
If you're using Apt 1.1 or above, --force-yes has been deprecated, so you've to use the options starting with --allow instead, e.g. --allow-downgrades, --allow-remove-essential, --allow-change-held-packages.

I actually do not want to downgrade or remove essential, or change held packages.

And this problem is only with openssh-server package.
I have updated 100+ packages on serveral ervers and with my options apt update worker correctly. EXECEPT openssh_server

Revision history for this message
Bernard Stafford (bernard010) said :
#3

Run your command again...
then in a terminal: sudo systemctl restart ssh
Restart the ssh service to pick up configuration changes

Can you help with this problem?

Provide an answer of your own, or ask Dmitrijs Lahs for more information if necessary.

To post a message you must log in.