Custom Linux Login Banners (MOTD, SSH, and ASCII Art)
π§© Customizing Linux Login Banners
Bored of the default login banners? Letβs customize the welcome message on most Linux systems.
Login messages are displayed in two stages:
- Before authentication (SSH login prompt)
- After login (MOTD - Message of the Day)
π 1. Before Login (Pre-Authentication Banner)
Edit:
sudo nano /etc/issue.net
π To enable this banner via SSH, update your SSH configuration (see below).
π Reference: OpenSSH sshd_config documentation
π 2. After Login (Post-Authentication Banner)
Edit the MOTD file:
sudo nano /etc/motd
π Reference: Linux MOTD documentation
π Example Security Banner
This system is for authorized use only. All activities are logged and checked at frequent intervals. Unauthorized individuals attempting to connect to, port-scan, deface, hack, or otherwise interfere with any services on this system will be reported.
β οΈ Cloud Caveat (AWS, Azure, etc.)
On cloud platforms like:
Your changes may reset after reboot due to dynamic MOTD scripts.
π οΈ Make Your Banner Persistent
Option 1: Disable MOTD Update Script
sudo update-motd --disable
β οΈ This may not exist on all distributions. On Ubuntu, dynamic scripts live under
/etc/update-motd.d/.
π Reference: Ubuntu Dynamic MOTD
Option 2: Configure SSH Banner Properly
Edit SSH config:
sudo nano /etc/ssh/sshd_config
Find:
#Banner /etc/issue.net
Uncomment it:
Banner /etc/issue.net
Restart SSH:
sudo systemctl restart sshd
π¨ Bonus: ASCII Art Banners
Want something more fun and personalized? Use ASCII generators.
π§ Tools
π¦ Installation
Debian / Ubuntu
sudo apt install figlet toilet
CentOS / RHEL
sudo yum install figlet toilet
Fedora
sudo dnf install figlet toilet
π Example Usage
figlet Jesus
Try styles:
toilet -f mono12 -F metal Jesus
Example output:
_
| | ___ ___ _ _ ___
_ | |/ _ \/ __| | | / __|
| |_| | __/\__ \ |_| \__ \
\___/ \___||___/\__,_|___/
π Related Posts
- π Linux Kernel Performance Tuning
- π SRE Metrics That Matter
- π Infrastructure as Code Patterns
π‘ Pro Tips
- Combine security warning + ASCII branding
- Keep banners short for production systems
- Use
/etc/issue.netonly for legal/security notices - Avoid leaking system info (security risk)
β Wrap Up
Custom login banners are a small tweakβbut they:
- Improve security posture
- Add professional branding
- Enhance developer experience
π¬ Have a cool banner setup? Share it!