In Ubuntu Server, Canonical implements a dynamic “Message of the Day” (MOTD) system that displays real-time information when an administrator logs in via SSH. A specific component of this system is the motd-news.timer, a systemd background unit that automatically fetches external “news” payloads from Canonical’s servers (https://motd.ubuntu.com) and injects them into the terminal login prompt. While this may inform consumer users about upcoming Ubuntu releases or cloud promotions, allowing a background daemon to silently pull dynamic, unverified text from external internet endpoints introduces a severe operational liability on mission-critical production servers, strict air-gapped database clusters, or compliance-heavy enterprise environments. This automated network beacon consumes unnecessary outbound bandwidth and violates strict zero-telemetry administrative mandates.
This guide explains how to completely disable the motd-news.timer in Ubuntu Server, enforcing an absolute block on automated external MOTD fetching and ensuring the SSH login prompt remains entirely static, secure, and disconnected from Canonical’s advertising servers.
Stop and Mask the motd-news Timer
Because the MOTD news fetching routine is hardcoded into Ubuntu’s default systemd architecture, simply deleting the script from /etc/update-motd.d/ is insufficient, as OS updates will frequently regenerate it. To enforce a strict, immutable block, we must explicitly mask the systemd timer.
- Log into your Ubuntu Server via SSH using an account with
sudoprivileges. - Stop the timer to halt any currently scheduled execution:
sudo systemctl stop motd-news.timer - Stop the associated service unit that the timer invokes, aborting any active background fetch tasks:
sudo systemctl stop motd-news.service - Mask both the timer and the fetch service units. This symlinks them to
/dev/null, creating a hard block against future activation by package triggers, OS updates, or manual invocations:sudo systemctl mask motd-news.timer sudo systemctl mask motd-news.service - Finally, to ensure the OS configuration explicitly mirrors this change, edit the default MOTD configuration file:
sudo sed -i 's/ENABLED=1/ENABLED=0/' /etc/default/motd-news
Verify the Service Lockdown
By masking the timer and updating the configuration file, you guarantee that systemd will completely reject any attempt to invoke the MOTD news fetch routine, severing the connection to Canonical’s servers.
To verify the lockdown is successful, attempt to start the timer manually:
sudo systemctl start motd-news.timer
Systemd will return a fatal error stating that the unit is masked (e.g., Failed to start motd-news.timer: Unit motd-news.timer is masked). Furthermore, logging out and logging back in via SSH will immediately demonstrate that the dynamic Ubuntu promotional text is completely absent from the login prompt. The server’s SSH interface is now strictly secured and operates with maximum data sovereignty.