We know: servers, VMs and bare metals are not cool nowadays, but you may still have them and have to take care of them, so how about making your life a little better?
This app provides a MOTD (Message Of The Day) optimized for providing the info about your server that YOU need to troubleshoot stuff when you SSH to it (because if you are doing it, then something IS wrong with the server, isn't it?).
curl -L https://github.com/gdubicki/dynamotd/releases/latest/download/dynamotd-linux-amd64 -o /usr/local/bin/dynamotd && chmod +x /usr/local/bin/dynamotd
(Optionally) Configure with /etc/dynamotd.yaml
file. See the example config in dynamotd.yaml.
Make it shown instead of or after your default static MOTD by editing /etc/pam.d/sshd
. Find line with pam_motd.so
and either replace or append this line to it:
session optional pam_exec.so stdout /usr/local/bin/dynamotd -force-color
(or -no-color
if you prefer plain black-and-white output).
Problem: dynamic MOTD is not shown during login.
Solution(s): there could be multiple reason for this.
One of them is if you use SSH multiplexing (ControlPath
, ControlMaster
, ControlPersist
in your SSH config) - then the MOTD will be shown only during creation of the first connection to the server. Read more about it here.
TODO: expand this section as more cases are identified.
See the example config in dynamotd.yaml.
Check out all the available command-line arguments by running dynamotd -help
.
Requirements:
How to build:
./build.sh
How to run tests:
go test -v tests/*
Optional, but recommended: use pre-commit and install the apps used by our config.
These features will be implemented in the future:
htop
, updated every 2 seconds,We also don't have user docs, developer docs and contribution guide.
What we DO have is some non-idiomatic code because the original author is only learning Golang. :P