Setting up a MOTD on your server adds a nice touch that welcomes you warmly every time you connect to it.
I used to make my own MOTD in ASCII text, but I've been using dynamic-motd by ldidry for a few years.
It's simple Bash and Python scripts that are executed in place of the MOTD. It seems they are only compatible with Debian-based distributions, though.
It's very easy to setup.
First install dependencies:
apt-get install figlet lsb-release python-utmp bc
Then clone the repository and copy the files:
git clone https://github.com/ldidry/dynamic-motd.git cd dynamic-motd cp -r update-motd.d/ /etc rm /etc/motd ln -s /var/run/motd /etc/motd cd .. rm -r dynamic-motd
You lookup the files in
root@lyra ~# ll /etc/update-motd.d/ total 36K -rwxr-xr-x 1 root root 113 Jul 5 2017 00-figlet* -rwxr-xr-x 1 root root 1.6K Jul 5 2017 10-banner* -rwxr-xr-x 1 root root 374 Jul 5 2017 20-system-info* -rwxr-xr-x 1 root root 505 Jul 5 2017 30-need-upgrade* -rwxr-xr-x 1 root root 396 Jul 5 2017 40-need-reboot* -rwxr-xr-x 1 root root 358 Jul 5 2017 50-services-need-restart* -rw-r--r-- 1 root root 174 Jul 5 2017 colors -rw-r--r-- 1 root root 107 Feb 6 10:24 lsb-release -rw-r--r-- 1 root root 2.9K Jul 5 2017 sysinfo.py
Reconnect to your server, and there you have it!
You have the main information of your server, plus the hostname written in a nice red ASCII style.