Red Hat Bugzilla – Bug 758535
Restarting sshd kills current sessions
Last modified: 2011-12-01 05:16:09 EST
Description of problem:
Old behavior of sshd restart was such that existing sessions kept running until disconnected. New behavior makes administering remote machines much harder.
[root@mach ~]# systemctl restart sshd.service
Connection to mach closed by remote host.
Connection to mach closed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. ssh into remote F16 machine
2. run "systemctl restar sshd.service"
Session is immediately teminated, have to log in again (probably impossible if ran "systemctl stop sshd.service" by accident)
Session should remain open
How does your /etc/pam.d/sshd and /etc/pam.d/password-auth look like? Do you have 'UsePam yes' in /etc/ssh/sshd_config? See bug #757545
sshd_config indeed uses old configuration with "UsePam no"
This server has a policy of only allowing logins using asymmetric keys -- will pam cause password logins to be allowed?
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
So with your configuration, PAM is used only for account and session checks and password logins are not enabled.
*** This bug has been marked as a duplicate of bug 757545 ***