Dynamically Generated MOTD for Linux Servers
Compatibility: Debian based Distributions
Clone the github repository
git clone https://github.com/ReidWeb/linuxmotd.gitRun the 'installation' script
cd linuxmotd
sudo ./install.shI'd recommend installing to /etc/dynmotd/, if you don't input anything it will default to /etc/dynmotd/. If you decided to use another directory, remember to change the directories below
In the input prompt, enter the directory to which you want to install the scripts - Defaults to /etc/dynmotd/
Now add some ASCII art by editing the file 'dynmotdart' in the installation directory, ASCII art can be generated at: http://ruletheweb.co.uk/figlet/
Now add a cron job to auto-run the 'update-checker' script
sudo crontab -eAppend the following to the bottom of the file
0 * * * * /etc/dynmotd/update-checker.shRemove the contents of /etc/motd
sudo nano /etc/motdEdit the /etc/ssh/sshd_config
sudo nano /etc/ssh/sshd_config Replace
PrintLastLog yes
#and
PrintMotd yeswith
PrintLastLog no
#and
PrintMotd noThen restart the ssh service
sudo /etc/init.d/ssh restartModify /etc/pam.d/login
sudo nano /etc/pam.d/loginComment out the line below
#session optional pam_motd.soModify /etc/profile
sudo nano /etc/profileAppend the following line to the bottom of the file:
/etc/dynmotd/dynmotd.sh