ssh drops the session after a password change
Issue
- ssh drops the session after a password change
- sshd disconnects immediately after forced password change
- When a user password is expired, sshd prompts the user to change the password. The session closed by SSHD without any warning/messages, which confuses the end user.
# ssh nc@linux1
nc@linux1's password:
You are required to change your password immediately (root enforced)
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user nc.
(current) UNIX password:
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Connection to localhost closed.
Environment
- Red Hat Enterprise Linux 5/6
- OpenSSH sshd
- User Password expired
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.