🧩 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:

  1. Before authentication (SSH login prompt)
  2. 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

  • FIGlet β€” simple CLI tool for ASCII text
  • Toilet β€” adds styling and colors

πŸ“¦ 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:

     _           
    | | ___  ___ _   _ ___  
 _  | |/ _ \/ __| | | / __| 
| |_| |  __/\__ \ |_| \__ \ 
 \___/ \___||___/\__,_|___/ 


πŸ’‘ Pro Tips

  • Combine security warning + ASCII branding
  • Keep banners short for production systems
  • Use /etc/issue.net only 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!


πŸš€ Visit me for more DevOps content