Bug#927884: openssh-server: Fails to restart ssh service after upgrade
Package: openssh-server
Version: 1:7.9p1-10
Severity: important
Dear Maintainer,
When running apt upgrade, openssh-server was left unconfigured
after being upgraded to version 1:7.9p1-10. The configuration
script output was as follows:
=================
Setting up openssh-server (1:7.9p1-10) ...
rescue-ssh.target is a disabled or a static unit, not starting it.
Failed to restart ssh.service: Unit -.mount is masked.
invoke-rc.d: initscript ssh, action "restart" failed.
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-04-22 12:18:22 -03; 2 days ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 960 (sshd)
Tasks: 1 (limit: 4915)
Memory: 3.1M
CGroup: /system.slice/ssh.service
└─960 /usr/sbin/sshd -D
Apr 22 12:18:19 <%hostname%> systemd[1]: Starting OpenBSD Secure Shell server...
Apr 22 12:18:22 <%hostname%> sshd[960]: Server listening on 0.0.0.0 port 22.
Apr 22 12:18:22 <%hostname%> sshd[960]: Server listening on :: port 22.
Apr 22 12:18:22 <%hostname%> systemd[1]: Started OpenBSD Secure Shell server.
Apr 23 14:53:57 <%hostname%> sshd[3409]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]
Apr 23 14:53:59 <%hostname%> sshd[3409]: Accepted password for fmneto from 2001:12d0:8020::17 port 40967 ssh2
Apr 23 14:53:59 <%hostname%> sshd[3409]: pam_unix(sshd:session): session opened for user fmneto by (uid=0)
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of ssh:
ssh depends on openssh-server (>= 1:7.9p1-10); however:
Package openssh-server is not configured yet.
dpkg: error processing package ssh (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openssh-server
ssh
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked.
E: Sub-process /usr/bin/dpkg returned an error code (1)
=================
Searching for this error did not return anything useful, but I
realized that the issue was with restarting the ssh service.
I found a workaround for this: disable the ssh service, run
the upgrade, then re-enable the service. It still complains
with:
"Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount
is masked."
But apart from that the service was restarted and everything is
working again.
--
Francisco
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (800, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.19.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8), LANGUAGE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages openssh-server depends on:
ii adduser 3.118
ii debconf [debconf-2.0] 1.5.71
ii dpkg 1.19.6
ii libaudit1 1:2.8.4-2
ii libc6 2.28-8
ii libcom-err2 1.44.5-1
ii libgssapi-krb5-2 1.17-2
ii libkrb5-3 1.17-2
ii libpam-modules 1.3.1-5
ii libpam-runtime 1.3.1-5
ii libpam0g 1.3.1-5
ii libselinux1 2.8-1+b1
ii libssl1.1 1.1.1b-2
ii libsystemd0 241-3
ii libwrap0 7.6.q-28
ii lsb-base 10.2019031300
ii openssh-client 1:7.9p1-10
ii openssh-sftp-server 1:7.9p1-10
ii procps 2:3.3.15-2
ii ucf 3.0038+nmu1
ii zlib1g 1:1.2.11.dfsg-1
Versions of packages openssh-server recommends:
ii libpam-systemd 241-3
ii ncurses-term 6.1+20181013-2
ii xauth 1:1.0.10-1
Versions of packages openssh-server suggests:
ii ksshaskpass [ssh-askpass] 4:5.14.5-1
pn molly-guard <none>
pn monkeysphere <none>
pn rssh <none>
pn ufw <none>
-- debconf information:
openssh-server/permit-root-login: true
openssh-server/password-authentication: true
Reply to: