This assumes sudo and bash are installed and bash has been set to the default shell.
# download gist
git clone https://gist.github.com/d2cc2ef4ba6d5291f3f6d0c51fc3e099.git motd
cd motd
# copy to /etc
sudo cp 99-motd.sh /etc/
# ~/.bashrc
# Display MOTD on interactive login shells
if [ -n "$PS1" ] && [ -f /etc/99-motd.sh ]; then
. /etc/99-motd.sh
fi
# ~/.profile
. .bashrc