I have an Ubuntu server running at sandbox.plushu.org - if you add your key at , you can connect to the server as . You can reset the server by pressing the reset button on .
I have a custom time-sensitive MOTD on this server. The problem that I'm seeing is that this MOTD, when regenerated (via /etc/update-motd/*) at login, is not displayed until the next login. The first time you log in, you will see the MOTD as generated at boot: the next time you log in, you will see the MOTD as generated the last time you logged in.
What is causing this behavior? How can it be fixed so that, on logging in, the MOTD is generated, then displayed?
1 Answer
This behaviour is configured in /etc/pam.d/sshd:
session optional pam_motd.so motd=/run/motd.dynamic noupdateTry to remove "noupdate" keyword.
As described in - it means..
2Don't run the scripts in /etc/update-motd.d to refresh the motd file.