I was able to fix this by stopping `ssh.service` and `ssh.socket`. After that the upgrade worked (by `apt upgrade`).
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) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openssh in Ubuntu. https://bugs.launchpad.net/bugs/2078461 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 Status in openssh package in Ubuntu: Confirmed 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 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2078461/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp