[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#751636: ssh sessions are not cleanly terminated on shutdown/restart with systemd



If sshd is configured with UsePAM yes, then after installing libpam-systemd to a remote system and rebooting, ssh sessions are cleanly terminated, but after purging libpam-systemd and rebooting, ssh session are not cleanly terminated.

If sshd is configured with UsePAM no, then installing/purging libpam-systemd has no effect, and ssh session are not cleanly terminated.

When sshd is configured with UsePAM yes, and libpam-systemd is installed, /usr/share/pam-configs/systemd refers to registering user sessions in the systemd control group hierarchy.  Could this explain how ssh sessions are being shutdown cleanly when using PAM?  Does the ssh service, apart from PAM, similarly register sessions in the systemd control group hierarchy?  If the ssh service does not register sessions with the systemd control group hierarchy, could that explain this issue?

Steps to reproduce (noting that the install/purge AND the reboot must be completed before the ssh session behavior changes):

Use ssh to connect to a remote system where ssh sessions are not cleanly terminated on remote system reboot.
Configure sshd with UsePAM yes.
Install libpam-systemd.
Reboot.
Observe ssh session is not cleanly terminated.
Use ssh to connect to remote system.
Reboot.
Observe ssh session is cleanly terminated.
Use ssh to connect to remote system.
Remove libpam-systemd.
Reboot.
Observe ssh session is cleanly terminated.
Use ssh to connect to remote system.
Reboot.
Observe ssh session is not cleanly terminated.

--
Daniel Kauffman
Lead Developer
Rock Solid Solutions, LLC
877.239.9195 toll-free
208.699.9699 mobile




Reply to: