You are not logged in.
Hi, I am facing a problem when I login my pc via SSH.
after a successful login, It shows like this:
ssh user@arch.mydomain.com
user@arch.mydomain.com 's password:
Last login: Fri Jan 10 17:32:40 2020 from 223.235.126.228
Last login: Fri Jan 10 17:32:40 2020 from 223.235.126.228
It seems that the Last Login section printed twice.
After checking it over Internet, Im sure my sshd_config file have already contains following declaration:
UsePAM yes
PrintMotd no # pam does that
And my /etc/pam.d/system-login is like followings:
#%PAM-1.0
auth required pam_tally2.so onerr=succeed file=/var/log/tallylog
auth required pam_shells.so
auth requisite pam_nologin.so
auth include system-auth
account required pam_tally2.so
account required pam_access.so
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_loginuid.so
session optional pam_keyinit.so force revoke
session include system-auth
session optional pam_motd.so motd=/etc/motd
session optional pam_mail.so dir=/var/spool/mail standard quiet
-session optional pam_systemd.so
session required pam_env.so
How do I make the message only appear once? thank you!
Novice.
Offline
Did you check the other files in /etc/pam.d for "motd" or if they been modified from default?
What about your user login shell files? Does this happen for all other users and have you tried a new user?
Offline
Did you check the other files in /etc/pam.d for "motd" or if they been modified from default?
What about your user login shell files? Does this happen for all other users and have you tried a new user?
Sorry for the late reply. after a while when I try to login with other ssh clients I discovered that the issue only appears in native ssh client of windows 10. may be there is some thing wrong with the client, not server.
Novice.
Offline
Glad you figured it out: maybe there is an option to change this on the windows side? Remember to prepend "[SOLVED]" to your first post.
Offline