This question already has an answer here:
There's no "pam_lastlog" lines on BOTH servers' /etc/pam.d/sshd file. But "Machine 2" output the time. (and Machine 1 don't). The only differences are(sshd_config):
(1) LOGIN BY PUBKEY PubkeyAuthentication yes AuthorizeKeysFile /xxxx PasswordAuthentication No
(2) LOGIN BY USER+PASS ('PasswordAuthentication Yes' is not exist) PubkeyAuthentication No
Of course, I always update them using apt-get. Why this is different?
(1) :~$ lastlog /var/log/lastlog: No such file or directory :~$ sudo su :~# lastlog /var/log/lastlog: No such file or directory uname -a Linux X 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1+deb8u1 (2017-02-22) i686 GNU/Linux
(2) :~# lastlog Username Port From Latest...... uname -a Linux X 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1 (2016-12-30) i686 GNU/Linux apt-get dist-upgrade 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.