update overwrites sshd_config

Bug #1802090 reported by Dominic Raferd
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

The latest update for Bionic (18.04.1) either overwrote or modified my /etc/ssh/sshd_config with the result that I could no longer access my machine using ssh.

A specific
    Port [x]
line was removed and replaced by:
    #Port 22

This was the only change. It happened as part of an automated process this morning - presumably a security update.

Was this behaviour intended?!

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

That's not supposed to happen. Could you please attach your /var/log/dist-upgrade/apt-term.log file?

Did you update manually, or was this done automatically?

Thanks.

Changed in openssh (Ubuntu):
status: New → Incomplete
Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :

It was an automatic update, file attached

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

It looks like you upgraded from Ubuntu 16.04 to Ubuntu 18.04.
From the log file:

Unpacking openssh-server (1:7.6p1-4) over (1:7.2p2-4ubuntu2.4) ...

Then the upgrade asked you what to do with the modified conffile, again, from the log:

Configuring openssh-server
sshd_config: A new version (/tmp/filerMG8sJ) of configuration file /etc/ssh/sshd_config is available, but the
version installed currently has been locally modified.
What do you want to do about modified configuration file sshd_config? install the package maintainer's version
keep the local version currently installed
show the differences between the versions
show a side-by-side difference between the versions
start a new shell to examine the situation
<snip>
# nano /tmp/filerMG8sJ
<snip>
Replacing config file /etc/ssh/sshd_config with new version

At which point you edited the file and instructed the upgrade process to use the new package version.

I'm not quite sure what you expect this bug to resolve, the package seems to be acting as it should.

Revision history for this message
Colin Watson (cjwatson) wrote :

This log was from 2018-06-27, not from this morning.

I think we need to see /var/log/apt/term.log instead.

Revision history for this message
Dominic Raferd (dominic-timedicer) wrote : Re: [Bug 1802090] Re: update overwrites sshd_config

The update to 18.04 was a long time ago, the problem occurred this
morning...

On Wed, 7 Nov 2018 at 13:01, Marc Deslauriers <
<email address hidden>> wrote:

> It looks like you upgraded from Ubuntu 16.04 to Ubuntu 18.04.
> >From the log file:
>
> Unpacking openssh-server (1:7.6p1-4) over (1:7.2p2-4ubuntu2.4) ...
>
> Then the upgrade asked you what to do with the modified conffile, again,
> from the log:
>
> Configuring openssh-server
> sshd_config: A new version (/tmp/filerMG8sJ) of configuration file
> /etc/ssh/sshd_config is available, but the
> version installed currently has been locally modified.
> What do you want to do about modified configuration file sshd_config?
> install the package maintainer's
> version
> keep the local version currently installed
> show the differences between the versions
> show a side-by-side difference between the versions
> start a new shell to examine the situation
> <snip>
> # nano /tmp/filerMG8sJ
> <snip>
> Replacing config file /etc/ssh/sshd_config with new version
>
> At which point you edited the file and instructed the upgrade process to
> use the new package version.
>
> I'm not quite sure what you expect this bug to resolve, the package
> seems to be acting as it should.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1802090
>
> Title:
> update overwrites sshd_config
>
> Status in openssh package in Ubuntu:
> Incomplete
>
> Bug description:
> The latest update for Bionic (18.04.1) either overwrote or modified my
> /etc/ssh/sshd_config with the result that I could no longer access my
> machine using ssh.
>
> A specific
> Port [x]
> line was removed and replaced by:
> #Port 22
>
> This was the only change. It happened as part of an automated process
> this morning - presumably a security update.
>
> Was this behaviour intended?!
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1802090/+subscriptions
>

Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :

attached: /var/log/apt/term.log

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Oh, sorry about that, I didn't notice the date...and also requested the wrong log file.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

From the new log:

Preparing to unpack .../openssh-sftp-server_1%3a7.6p1-4ubuntu0.1_amd64.deb ...
Unpacking openssh-sftp-server (1:7.6p1-4ubuntu0.1) over (1:7.6p1-4) ...
Preparing to unpack .../openssh-server_1%3a7.6p1-4ubuntu0.1_amd64.deb ...
Unpacking openssh-server (1:7.6p1-4ubuntu0.1) over (1:7.6p1-4) ...
Preparing to unpack .../openssh-client_1%3a7.6p1-4ubuntu0.1_amd64.deb ...
Unpacking openssh-client (1:7.6p1-4ubuntu0.1) over (1:7.6p1-4) ...
Setting up openssh-client (1:7.6p1-4ubuntu0.1) ...
Setting up openssh-sftp-server (1:7.6p1-4ubuntu0.1) ...
Setting up openssh-server (1:7.6p1-4ubuntu0.1) ...
Replacing config file /etc/ssh/sshd_config with new version
Log ended: 2018-11-07 06:53:53

That's quite odd, since it didn't prompt, that implies it was using an unmodified /etc/ssh/sshd_config from the previous package...

Colin, any ideas?

Revision history for this message
Robie Basak (racb) wrote :

To clarify a couple of things:

> Was this behaviour intended?!

No - modifications in /etc are not supposed to be overwritten by packaging without user intervention.

Unfortunately though unless someone figures out steps to reproduce the problem, I don't think any progress will be able to be made on this report, and we can't be certain that the problem was caused by a bug rather a local misconfiguration.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openssh (Ubuntu) because there has been no activity for 60 days.]

Changed in openssh (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.