This project tries to make actual use of nice feature of Linux which is Message of the Day (motd) shown upon login. Inspired by Ubuntu's dynamic motd, I wanted to bring similar feature to other Linux distros.
The result is custom tailored to my needs and tested on Debian 9 & 8 as well as Linux Mint 19.
When you ssh into the machine, you will see an output similar to this:
Welcome to Debian GNU/Linux 9.6 (stretch)
Kernel: #1 SMP Debian 4.9.130-2 (2018-10-27)
System is up 2 weeks, 2 hours, 5 minutes
System information as of Tue Nov 27 17:04:46 CET 2018
CPU load: 0.09 0.03 0.01 (114 processes)
Memory: 488M ( 6%) out of 8.0G
Swap: not available
Disk: 31G (54%) out of 60G
Users logged in: gaeldrin (1 user total)
3 packages can be updated.
0 updates are security updates.
Last login: Tue Nov 27 17:04:26 2018 from 127.0.0.1
-
Clone the repository anywhere on the box
git clone https://github.com/Gaeldrin/nice-motd.git
-
Run the installation script or repeat selected steps manually
nice-motd/install.sh
-
[optional] On Debian 8 (as well as possibly other systems), you might still see the same old motd after successful installation. In this case, you need to edit the PAM configuration that does not work properly. Open the file
/etc/pam.d/sshd
and change lines like this#session optional pam_motd.so motd=/run/motd.dynamic session optional pam_motd.so motd=/run/motd
-
Navigate to the cloned folder and run the removal script
nice-motd/uninstall.sh
-
Remove the cloned folder
rm -rf nice-motd