message of the day (motd) not displayed

January 28, 2016 8.2k views
Monitoring DigitalOcean

The message of the day(motd) is no longer displayed when I login into the VPS. I had installed some python libraries and ran sudo apt-get autoremove when I had to delete incorrect libraries.

Did that mess with motd in any way? How can I re-enable it?

  • Things to check for (assuming Ubuntu distro?):

    1. make sure /etc/motd.tail exists (or create an empty file, to be auto-populated later)
    2. make sure /etc/init/mounted-run.conf was not removed
    3. check that there are scripts in /etc/update-motd.d/
  • I verified the above 3 points. Everything is fine in the droplet. But still the motd is not diplayed

1 Answer

Is the MOTD displayed when you log in through the remote console? Make sure that your sshd config allows the MOTD to be shown on login:

UsePAM yes
PrintMotd no

Don’t forget to restart the ssh server/daemon after modifying the config file:

sudo service ssh restart
Have another answer? Share your knowledge.