SSH Notes
SSH Login Message
Acronyms and Definitions
- MOTD = Message of the Day
Login Messages
- sudo vim /etc/issue.netDisplays a message before the user begins login, I do not use this.- sudo vim /etc/ssh/sshd_configensure the following option is set- Banner /etc/issue.net(you can actually used any path/file)
- sudo systemctl reload sshdneeds to be performed after any change to the configuration file to activate the changes.
 
- sudo vim /etc/motdDisplays the banner text after login. This usually has some predefined Linux distribution text
Login Scripts
Debian
- ls -la /etc/update-motd.d/to see the scripts that are run after the MOTD is displayed.
The Debian script is very simple:
#!/bin/sh uname -snrvm
Ubuntu
Ubuntu has multiple scripts some that I like and some that I do not like. This system status information script,
/etc/update-motd.d/50-landscape-sysinfo
The main information script is written in python3,