![]() | ![]() |
Taking arbitrary actions with /etc/sshrc
Incidentally, sshd obeys the Unix "hushlogin" convention. If the file ~/.hushlogin exists, /etc/motd isn't printed on login, regardless of the PrintMotd value. A message about email (e.g., "You have mail") is printed on login if the CheckMail keyword has the value of yes (the default), or the message is skipped if the value is no:# SSH1, SSH2, OpenSSH PrintMotd no
# SSH1, SSH2, OpenSSH CheckMail yes
These messages are turned on and off by the keywords PasswordExpire-WarningDays and AccountExpireWarningDays, respectively:WARNING: Your password expires in 7 days WARNING: Your account expires in 10 days
The value following the keyword is a number of days, and by default, both values are 14. A zero value means that the warning message is suppressed. Note that account and password expiration aren't features of SSH, but of the host operating system.[72]# SSH1 only PasswordExpireWarningDays 7 AccountExpireWarningDays 10
[72]Account expiration requires that your operating system support /etc/shadow. Password expiration requires struct passwd to have a pw_expire field à la FreeBSD.If a password has expired, the SSH1 server can prompt the user to change it upon login. This feature is controlled by the keyword ForcedPasswdChange, given a value of yes or no (the default). If the feature is enabled:
the user is prompted to change a password if expired. Until this password is changed, SSH connections aren't accepted.# SSH1 only ForcedPasswdChange yes
empty passwords are permissible; otherwise not. The SSH1 server additionally may require users with empty passwords to change them. The keyword ForcedEmptyPasswdChange controls this feature much like ForcedPasswdChange for expired passwords. The ForcedEmptyPasswdChange keyword may have a value of yes or no (the default):# SSH1, SSH2, OpenSSH PermitEmptyPasswords yes
If the value is yes and the password is empty, then upon login, the user is prompted to change his or her password and can't log in until the change is made.# SSH1 only ForcedEmptyPasswdChange yes
![]() | ![]() | ![]() |
5.5. Letting People in: Authentication and Access Control | ![]() | 5.7. Subsystems |
Copyright © 2002 O'Reilly & Associates. All rights reserved.