package openssh-server 1:9.6p1-3ubuntu13.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1

Bug #2078461 reported by Michal Vittek
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Bug happened when upgrading ubutnu lts 22.04 to 24.04 - i picked to rewrite sshd config from mainatiner s version

ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: openssh-server 1:9.6p1-3ubuntu13.5
ProcVersionSignature: Ubuntu 5.15.0-119.129-generic 5.15.160
Uname: Linux 5.15.0-119-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.1
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSubPlatform: config-disk (/dev/sr0)
Date: Fri Aug 30 14:53:22 2024
ErrorMessage: installed openssh-server package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2021-02-09 (1298 days ago)
InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 (20200806.1)
Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 3.12.3-0ubuntu2
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.22.6ubuntu6.1
 apt 2.7.14build2
SSHDConfig: Error: command ['/usr/sbin/sshd', '-T'] failed with exit code 255: Missing privilege separation directory: /run/sshd
SourcePackage: openssh
Title: package openssh-server 1:9.6p1-3ubuntu13.5 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to noble on 2024-08-30 (0 days ago)
mtime.conffile..etc.init.d.apport: 2024-07-22T16:59:07

Revision history for this message
Michal Vittek (mvittek) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openssh (Ubuntu):
status: New → Confirmed
Revision history for this message
Anders Wenhaug (andersw) wrote (last edit ):

I was able to fix this by stopping `ssh.service` and `ssh.socket`. After that the upgrade worked (by `apt upgrade`). I also did `mkdir -p /run/sshd && chmod 755 /run/sshd`, not sure if that is necessary, though.

You should be able to stop both of those while still being connected (I tested this afterwards to be sure) since sshd seems to fork a new process that handles the connection. If you don't dare test this then I suggest running an ssh server on the side (`sudo sshd -f <sshd_config> -h /etc/ssh/ssh_host_rsa_key -D` - sshd_config should be a new config where you at least change the listen port)

Revision history for this message
Michal Vittek (mvittek) wrote :

Yes ssh service restart helped. Thanks

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.