package openssh-server 1:8.2p1-4ubuntu0.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1

Bug #1973217 reported by Frank Nemec
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

It might be that two instances of update-manager seemed to be running at the same time.

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: openssh-server 1:8.2p1-4ubuntu0.5
ProcVersionSignature: Ubuntu 5.13.0-41.46~20.04.1-generic 5.13.19
Uname: Linux 5.13.0-41-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.23
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu May 12 08:50:07 2022
ErrorMessage: installed openssh-server package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2020-10-06 (582 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SSHDConfig:
 Error: command ['/usr/sbin/sshd', '-T'] failed with exit code 255: /etc/ssh/sshd_config: line 125: Bad configuration option: Host
 /etc/ssh/sshd_config: line 126: Bad configuration option: ForwardX11
 /etc/ssh/sshd_config: terminating, 2 bad configuration options
SourcePackage: openssh
Title: package openssh-server 1:8.2p1-4ubuntu0.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to focal on 2021-09-29 (225 days ago)

Revision history for this message
Frank Nemec (webdev) wrote :
Revision history for this message
Lena Voytek (lvoytek) wrote :

Hello Frank,

You noted that this may be due to update-manager having two instances running. Were you able to try again with one running to get it updated? If not, does updating with:

sudo apt update
sudo apt upgrade

cause any errors?

Thanks!

Changed in openssh (Ubuntu):
status: New → Incomplete
Revision history for this message
Frank Nemec (webdev) wrote : Re: [Bug 1973217] Re: package openssh-server 1:8.2p1-4ubuntu0.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1

On 5/16/22 09:42, Lena Voytek wrote:
> You noted that this may be due to update-manager having two instances
> running. Were you able to try again with one running to get it updated?
> If not, does updating with:
>
> sudo apt update
> sudo apt upgrade
>
> cause any errors?

Yes, errors persist:

apt install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
   libfwupdplugin1
Use 'sudo apt autoremove' to remove it.
Suggested packages:
   molly-guard monkeysphere ssh-askpass
The following NEW packages will be installed:
   openssh-server
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/377 kB of archives.
After this operation, 1,527 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package openssh-server.
(Reading database ... 298345 files and directories currently installed.)
Preparing to unpack .../openssh-server_1%3a8.2p1-4ubuntu0.5_amd64.deb ...
Unpacking openssh-server (1:8.2p1-4ubuntu0.5) ...
Setting up openssh-server (1:8.2p1-4ubuntu0.5) ...
rescue-ssh.target is a disabled or a static unit, not starting it.
Job for ssh.service failed because the control process exited with error
code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ssh, action "restart" failed.
● ssh.service - OpenBSD Secure Shell server
      Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor
preset: en
abled)
      Active: activating (auto-restart) (Result: exit-code) since Fri
2022-05-13
06:47:48 PDT; 3ms ago
        Docs: man:sshd(8)
              man:sshd_config(5)
     Process: 6402 ExecStartPre=/usr/sbin/sshd -t (code=exited,
status=255/EXCEPT
ION)
dpkg: error processing package openssh-server (--configure):
  installed openssh-server package post-installation script subprocess
returned e
rror exit status 1
Processing triggers for systemd (245.4-4ubuntu3.17) ...

and then:

systemctl status ssh.service

ssh.service - OpenBSD Secure Shell server
      Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor
preset: enabled)
      Active: failed (Result: exit-code) since Mon 2022-05-16 06:26:11
PDT; 4h 48min ago
        Docs: man:sshd(8)
              man:sshd_config(5)
     Process: 140702 ExecStartPre=/usr/sbin/sshd -t (code=exited,
status=255/EXCEPTION)

May 16 06:26:11 paradise systemd[1]: ssh.service: Scheduled restart job,
restart counter is at 5.
May 16 06:26:11 paradise systemd[1]: Stopped OpenBSD Secure Shell server.
May 16 06:26:11 paradise systemd[1]: ssh.service: Start request repeated
too quickly.
May 16 06:26:11 paradise systemd[1]: ssh.service: Failed with result
'exit-code'.
May 16 06:26:11 paradise systemd[1]: Failed to start OpenBSD Secure
Shell server.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to file this bug and trying to make Ubuntu better.

From the attached logs:

May 12 08:50:07 paradise sshd[59551]: /etc/ssh/sshd_config: line 125: Bad configuration option: Host
May 12 08:50:07 paradise sshd[59551]: /etc/ssh/sshd_config: line 126: Bad configuration option: ForwardX11
May 12 08:50:07 paradise sshd[59551]: /etc/ssh/sshd_config: terminating, 2 bad configuration options

Which tells us that this is a local configuration issue. The Host and ForwardX11 options are causing the issue, avoiding the service to start.

Since it seems likely to me that this is a local configuration problem,
rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.

However, if you believe that this is really a bug in Ubuntu, then we would
be grateful if you would provide a more complete description of the problem
with steps to reproduce, explain why you believe this is a bug in Ubuntu
rather than a problem specific to your system, and then change the bug
status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

tags: removed: need-duplicate-check
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.