How to Display a Custom ASCII Art Welcome Message on Linux SSH Login (MOTD)

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.

  1. Open a web browser on your local computer and go to an ASCII generator website (like patorjk.com/software/taag).
  2. Type the name of your server (e.g., “PRODUCTION_DB”).
  3. Select a chunky, readable font style like “Slant” or “Standard”.
  4. 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.

  1. Log into your Linux server via SSH.
  2. Open the MOTD file using a text editor like nano:
    sudo nano /etc/motd
  3. Delete any existing text in this file that you no longer want to see.
  4. Paste your ASCII art from your clipboard directly into the nano editor.
  5. Add any additional warnings below the art, such as: “WARNING: Live Production Environment. Tread Carefully.”
  6. 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.

  1. In the terminal, navigate to the update directory:
    cd /etc/update-motd.d/
  2. List the scripts inside by typing ls. You will see files like 10-help-text and 50-motd-news.
  3. 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
  4. 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.

  1. Type exit in the terminal to close your SSH session.
  2. 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.

RELATED POSTS

  • How to Check if Your Linux System is Using UEFI or Legacy BIOS
  • How to Use the df Command to Instantly Check Total Free Hard Drive Space in Linux
  • How to View the Contents of a File in Linux Using the Cat Command
  • How to Use the paste Command in Linux to Merge Lines of Files
  • How to Use the ss Command to Monitor TCP Socket States and Queue Lengths
  • Get the best tech tips delivered straight to your inbox.

    Join thousands of readers mastering Apple, Google, Microsoft, and Linux.