When you connect to a Linux server via SSH, the terminal usually greets you with a bland block of text detailing the last login time, warranty disclaimers, and available system updates. If you manage multiple servers, this lack of visual distinction makes it dangerously easy to accidentally execute a destructive command on your production server when you thought you were logged into your staging environment.
A brilliant way to visually differentiate your servers and add a touch of personality to your workflow is to configure a custom “Message of the Day” (MOTD) featuring bold ASCII art. When you log in, you will be instantly greeted by a massive logo or clear text stating exactly which machine you have accessed.
Step 1: Generate Your ASCII Art
Unless you are highly skilled at typography using a keyboard, you should use a generator to create your text art.
- Open a web browser on your local computer and go to an ASCII generator website (like patorjk.com/software/taag).
- Type the name of your server (e.g., “PRODUCTION_DB”).
- Select a chunky, readable font style like “Slant” or “Standard”.
- Copy the generated ASCII text block to your clipboard.
Step 2: Edit the MOTD File
The Message of the Day is controlled by a simple text file located in the /etc/ directory. You will need root privileges to edit it.
- Log into your Linux server via SSH.
- Open the MOTD file using a text editor like nano:
sudo nano /etc/motd - Delete any existing text in this file that you no longer want to see.
- Paste your ASCII art from your clipboard directly into the nano editor.
- Add any additional warnings below the art, such as: “WARNING: Live Production Environment. Tread Carefully.”
- Save the file and exit the editor (in nano, press Ctrl+O, Enter, then Ctrl+X).
Step 3: Disable Dynamic MOTD Updates (Ubuntu/Debian Only)
If you are using Ubuntu, you might notice that when you log in, your custom ASCII art appears, but it is immediately buried underneath 20 lines of dynamic system information (like package updates and Canonical news).
Ubuntu uses a script-based system located in /etc/update-motd.d/ to dynamically generate text and append it to your static /etc/motd file. To keep your ASCII art clean and visible, you can disable these chatty scripts.
- In the terminal, navigate to the update directory:
cd /etc/update-motd.d/ - List the scripts inside by typing
ls. You will see files like10-help-textand50-motd-news. - To disable a script from running, you simply remove its executable permissions using
chmod -x. For example, to stop the annoying Canonical news feed:sudo chmod -x 50-motd-news - To disable the basic help text:
sudo chmod -x 10-help-text
Leave critical scripts like 90-updates-available executable if you still want security update warnings to appear below your logo.
Step 4: Test the Login
You do not need to restart any services for the MOTD to take effect.
- Type
exitin the terminal to close your SSH session. - Immediately log back into the server via SSH.
Your terminal screen will instantly clear, presenting your massive, custom ASCII art right above the command prompt, guaranteeing you always know exactly which server you are administrating.