Updated: 28 September 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12
Show a message to everyone who logs in over SSH, for example a legal notice or maintenance information.
After login (message of the day)
Edit /etc/motd as root and write your text. It appears after a successful login.
Before login (banner)
- Write the text to
/etc/issue.net. - In
/etc/ssh/sshd_config, setBanner /etc/issue.net. - Restart SSH:
systemctl restart sshd(orsshon Ubuntu and Debian).
Example: "Authorised access only. All activity is logged."