đ Executive Summary
TL;DR: The âHow may I assist you today?â prompt, often from the MOTD systemâs motd-news script, can disrupt automated SSH processes by corrupting stdout. Solutions range from a user-specific .hushlogin file to system-wide fixes like disabling the specific motd-news script via chmod -x or reconfiguring the motd-news service to prevent its execution.
đŻ Key Takeaways
- The âHow may I assist you today?â prompt is typically a dynamic Message of the Day (MOTD) component, often
motd-newson Ubuntu/Debian, not an SSH daemon feature. - Three primary methods exist to silence the prompt: creating a
~/.hushloginfile (user-specific), removing execute permissions from the offending script in/etc/update-motd.d/(targeted system-wide), or disabling themotd-newsservice via/etc/default/motd-news(fleet-wide). - Unexpected output from MOTD scripts can break automation, making targeted suppression crucial for predictable and reliable system operations, especially in deployment pipelines.
Tired of the âHow may I assist you today?â prompt breaking your automation and cluttering your SSH sessions? Hereâs a senior engineerâs no-nonsense guide to silencing it for good across your Linux fleet.
The Ghost in the Shell: Banishing âHow may I assist you today?â From Your SSH Sessions
I remember it like it was yesterday. 3 AM, a critical database migration for a major client, and my deployment script starts failing with the most bizarre errors. The script was simple: SSH into prod-db-01, run a pg\_dump, and pipe the output back to a local file. But it kept dying. After an hour of pulling my hair out, I finally ran the SSH command manually and saw it: âHow may I assist you today?â. A well-intentioned, but utterly infuriating, welcome message was prepended to my stdout stream, corrupting the backup file and breaking the script. That little âhelpfulâ prompt cost us an hour of downtime. Never again.
So, Whatâs Actually Happening Here?
Letâs get one thing straight: this isnât an SSH daemon feature. SSH just gives you a shell. The âghostâ is a script, usually part of the Message of the Day (MOTD) system, that runs when your shell session starts. On systems like Ubuntu, this is often handled by a dynamic MOTD framework that pulls in various pieces of information. One of these, motd-news, is notorious for displaying promotional messages or âtips,â which can change unexpectedly and, as I learned, wreak havoc on automated processes that expect clean, predictable output.
The Fixes: From a Band-Aid to Brain Surgery
Look, I get it. You just want it gone. Weâve got a few ways to tackle this, from a quick personal fix to a permanent fleet-wide solution. Choose your weapon.
Solution 1: The Quick & Dirty (The .hushlogin)
If you just need to silence login messages for your own user account and donât have sudo rights, this is your go-to. Itâs the equivalent of putting on headphones in an open-plan office. It tells the login process to suppress all MOTD messages, including the annoying one.
Just create an empty file named .hushlogin in your home directory.
touch ~/.hushlogin
Thatâs it. Log out and log back in. Silence. The downside? It only applies to your user, and it silences everything, including potentially useful system info in the MOTD. Itâs a hack, but itâs an effective one.
Solution 2: The Surgical Strike (Disarm the Offending Script)
If you have administrative rights and want to kill the message for everyone without disabling the entire MOTD system, you need to find the specific script causing the problem and neutralize it. On most Ubuntu/Debian systems, these scripts live in /etc/update-motd.d/.
The culprit is usually a script with ânewsâ or a high number, like 99-news or similar. The cleanest way to disable it is to simply remove its execute permission.
# First, find the script (your number might be different)
ls -l /etc/update-motd.d/
# Let's say we find '98-motd-news'
sudo chmod -x /etc/update-motd.d/98-motd-news
This is my preferred method. Itâs targeted, easily reversible (just chmod +x the file to restore it), and it solves the problem at the source without collateral damage.
Darianâs Pro Tip: Before you go changing permissions on system files, make sure you know what youâre disabling. A quick
cat /etc/update-motd.d/98-motd-newswill show you the scriptâs contents. If it mentionsmotd.ubuntu.com, youâve found your ghost.
Solution 3: The âNuclearâ Option (Reconfigure the Service)
Sometimes, a problem is a symptom of a misconfigured system. If your organizationâs policy is âno external news or ads on our servers, ever,â then you should disable the service entirely. For Ubuntuâs news service, this is controlled by a configuration file.
Youâll need to edit /etc/default/motd-news and change the ENABLED flag.
# Open the file with your favorite editor
sudo nano /etc/default/motd-news
# Find this line:
ENABLED=1
# And change it to:
ENABLED=0
This prevents the service from even trying to fetch news updates. This is the âscorched earthâ approach, perfect for configuration management tools like Ansible or Puppet to enforce a consistent state across your entire server fleet.
Choosing Your Path
Not sure which one to use? Hereâs how I break it down for my team:
| Solution | Scope | Best For | Risk |
| .hushlogin | Single User | Quick personal fix, no sudo access. | Low |
| chmod -x | System-Wide (Single Server) | Targeted removal on a few servers. | Low |
| Disable Service | System-Wide (Fleet Policy) | Enforcing a standard via automation. | Minimal |
At the end of the day, our job is to build reliable, predictable systems. A âhelpfulâ message that breaks a 3 AM deployment isnât helpful; itâs a liability. Find it, understand why itâs there, and get rid of it. Now, if youâll excuse me, I have a Jenkins pipeline to fix.
đ Read the original article on TechResolve.blog
â Support my work
If this article helped you, you can buy me a coffee:

Top comments (0)