From bbdd9a7827e6e266d948cb5619be9e46ce3e1ce0 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Mon, 19 Apr 2021 13:06:38 +0200 Subject: [PATCH] add script for dynamic stats --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa0d301..5f70671 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,26 @@ Don't forget to restart sshd after. ## Installation -Copy [motd](motd) file to `/etc/motd`. +### Banner only + +Copy [motd](motd) file to `/etc/motd`: + +```bash +curl -s https://raw.githubusercontent.com/claranet/motd/master/motd -o /etc/motd +``` + +### Dynamic with script + +Run the [install.sh](install.sh) script as admin: + +```bash +sudo ./install.sh +``` + +It is compatible with [update-motd](https://launchpad.net/update-motd) used by Ubuntu. + +For all other distributions you will have to add the following line to `/etc/pam.d/sshd`: + +``` +session optional pam_exec.so stdout /etc/update-motd.d/00-basic +```