Bug#751636: openssh-server: ssh sessions are not cleanly termined on shutdown/restart with systemd
On Wed, 29 Apr 2015 02:57:28 -0400 Matthew Dawson
<matthew@mjdsystems.ca> wrote:
> On Sun, 15 Jun 2014 01:20:41 +0200 Christoph Anton Mitterer
>>
>> Since openssh-server comes with systemd support, whenever a host
>> is shut down or restarted, ssh connections to that host just
>> hang and are no longer cleanly terminated (one also doesn't see
>> the shutdown message anymore).
>>
>> I'd suspect that systemd might shut down the network before it
>> kills the ssh session (or perhaps never kills them at all?)
>
> I ran into this issue on a freshly upgraded VM. I think I found an
> appropriate work around, installing libpam-systemd. With that,
> systemd seems to know about my ssh sessions and will close them
> down before killing the network.
Just writing to confirm that this workaround worked for me.
I was having this same problem on a new, minimal Jessie installation.
Installing libpam-systemd (and rebooting) fixed it.
As an aside, it seems strange that libpam-systemd was not installed in
a minimal Jessie install, since systemd recommends it. But perhaps
that's a quirk of the Debian Installer.
-Steven M.
Reply to: