package openssh-server 1:8.2p1-4ubuntu0.3 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
this happened during an update
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: openssh-server 1:8.2p1-4ubuntu0.3
ProcVersionSign
Uname: Linux 5.11.0-25-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Sat Aug 14 08:13:05 2021
ErrorMessage: installed openssh-server package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2020-11-11 (275 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: N/A
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.6
SSHDConfig: Error: command ['/usr/sbin/sshd', '-T'] failed with exit code 255: /etc/ssh/
SourcePackage: openssh
Title: package openssh-server 1:8.2p1-4ubuntu0.3 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
| tags: | removed: need-duplicate-check |

Hello and thanks for this bug report. By reading the bug description it looks like there is an issue in your sshd_config:
SSHDConfig: Error: command ['/usr/sbin/sshd', '-T'] failed with exit code 255: /etc/ssh/ sshd_config line 15: Badly formatted port number.
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 your reasoning and a sshd_config line 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!