package openssh-server 1:7.2p2-4ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Fix Released
|
Low
|
Colin Watson |
Bug Description
I messed up the ssh_config file and I need the stock config files for ssh server.
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: openssh-server 1:7.2p2-4ubuntu2.1
ProcVersionSign
Uname: Linux 4.4.0-72-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
AptOrdering:
openssh-server: Install
openssh-server: Configure
NULL: ConfigurePending
Architecture: amd64
Date: Thu Apr 20 14:13:40 2017
DuplicateSignature:
package:
Setting up openssh-server (1:7.2p2-
/var/lib/
dpkg: error processing package openssh-server (--configure):
subprocess installed post-installation script returned error exit status 2
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationDate: Installed on 2017-04-03 (17 days ago)
InstallationMedia: Ubuntu-Server 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.8)
RelatedPackageV
dpkg 1.18.4ubuntu1.1
apt 1.2.19
SourcePackage: openssh
Title: package openssh-server 1:7.2p2-4ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
You appear to have manually removed /etc/ssh, so you'll have to recover from that manually too. Reinstall the openssh-client package as follows:
sudo mkdir -p /etc/ssh :options: :=--force- confmiss --reinstall openssh-client
sudo dpkg --configure openssh-server
sudo apt install -oDPkg:
I've committed a change to my Debian openssh repository to ensure that /etc/ssh exists before trying to create sshd_config within it, which would have helped somewhat with this.