The MOTD is generated by scripts in /etc/update-motd.d. You can change those to affect the generated MOTD.
To stop displaying the MOTD on every login (“Welcome to Ubuntu[…]”), edit /etc/pam.d/login like so:
1 2 3 4 5 |
|
A similar change is required for all PAM services showing the MOTD, often including sshd.
- To disable this mechanism, instead of commenting the line, add the noupdate option like so:
1 2 3 4 5 |
|
Again, the same change is required in all services using pam_motd.so. You also need to disable the execution on boot with this change:
1 2 3 4 5 |
|