From 556ee3d2d433dc70512003667398f0979b0940a9 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 29 Jul 2016 02:22:51 +0100 Subject: Stop enabling ssh-session-cleanup.service by default; instead, ship it as an example and add a section to README.Debian. libpam-systemd >= 230 and "UsePAM yes" should take care of the original problem for most systemd users (thanks, Michael Biebl; closes: #832155). --- debian/README.Debian | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'debian/README.Debian') diff --git a/debian/README.Debian b/debian/README.Debian index d26e5a39d..f0e5bea24 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -232,6 +232,25 @@ it listen on a different address or port, then you will need to do this by copying /lib/systemd/system/ssh.socket to /etc/systemd/system/ssh.socket and modifying the ListenStream option. See systemd.socket(5) for details. +Terminating SSH sessions cleanly on shutdown/reboot with systemd +---------------------------------------------------------------- + +If you have libpam-systemd >= 230 installed (following openssh-server's +Recommends) and "UsePAM yes" in sshd_config (the default configuration +shipped by this package), then SSH sessions will be terminated cleanly when +the server is shut down or rebooted. + +If either of these conditions does not hold, then you may find that SSH +sessions hang silently when the server is shut down or rebooted. If you do +not want to use PAM or configure it properly for whatever reason, then you +can instead copy +/usr/share/doc/openssh-server/examples/ssh-session-cleanup.service to +/etc/systemd/system/ and run "systemctl enable ssh-session-cleanup.service". + +Non-systemd users may find /usr/lib/openssh/ssh-session-cleanup helpful if +they have a similar problem, although at present there is no system +integration for this for anything other than systemd. + -- Matthew Vernon Colin Watson -- cgit v1.2.3