Customization of the motd file
Customization of the motd file
What is the motd
Every time you open a new shell terminal, no matter if remotely or locally, you see a bunch of lines over the starting prompt. In Debian, those lines are stored in the /etc/motd file and can be modified or completely replaced by any other text.
How to modify the motd
The motd is just a text file that you can modify with a text editor like Vim or Nano. First make an .orig backup of the motd file before editing it. Then edit in any way you want:
$ sudo cp /etc/motd /etc/motd.orig
$ sudo vim /etc/motdImportant
Careful with the PrintMotd feature of the SSH daemon configuration
In the sshd configuration (found in /etc/ssh/sshd_config) there is a PrintMotd parameter set to no. Do not change it to yes or you will see the motd content printed twice when you connect to the motd’s system.