package openssh-server 1:7.6p1-4ubuntu0.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| openssh (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
Bug Description
¯\_(ツ)_/¯
ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: openssh-server 1:7.6p1-4ubuntu0.5
ProcVersionSign
Uname: Linux 4.15.0-147-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.24
Architecture: amd64
Date: Fri Aug 13 08:12:44 2021
ErrorMessage: installed openssh-server package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2014-05-30 (2631 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
Python3Details: /usr/bin/python3.6, Python 3.6.9, python3-minimal, 3.6.7-1~18.04
PythonDetails: /usr/bin/python2.7, Python 2.7.17, python-minimal, 2.7.15~rc1-1
RelatedPackageV
dpkg 1.19.0.5ubuntu2.3
apt 1.6.14
SourcePackage: openssh
Title: package openssh-server 1:7.6p1-4ubuntu0.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to bionic on 2019-01-28 (927 days ago)

Hello and thanks for your bug report. From the attached logs it seems that you have syntax errors in your sshd_config
sshd[1556]: /etc/ssh/ sshd_config: line 124: Bad configuration option: Host sshd_config: line 125: Bad configuration option: ServerAliveInterval sshd_config: terminating, 2 bad configuration options
sshd[1556]: /etc/ssh/
sshd[1556]: /etc/ssh/
If sshd was working before it may be that the service wasn't restarted after the breaking config change. The upgrade triggered a restart and thus the failure.
I'm setting this bug report as Incomplete for now. Should you think that this is actually a bug in Ubuntu and not a local configuration issue please comment back providing you reasoning ans possibly a minimal sshd_config that reproduces the issue in a clean Ubuntu system.
On the other hand should you find out this is actually a local configuration issue please set the status of this bug report to Invalid. Thanks!