Customize SSH Welcome Message for Ubuntu 24.04 LTS
Posted on Symbols count in article: 3.3kReading time ≈3 mins.
The way to customize the welcome message when logging into an Ubuntu server via SSH is as simple in Ubuntu 24.04 LTS as previous versions (18.04 LTS, 20.04 LTS).
A default welcome message looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.10.10-061010-generic x86_64)
Expanded Security Maintenance for Applications is not enabled.
65 updates can be applied immediately. 36 of these updates are standard security updates. To see these additional updates run: apt list --upgradable
11 additional security updates can be applied with ESM Apps. Learn more about enabling ESM Apps service at https://ubuntu.com/esm
Last login: Tue Jul 15 21:47:24 2025 from XXX.XXX.X.XXX
Kind of boring, huh? They are created by running several scripts located in /etc/update-motd.d/, with the starting number determining the order of execution:
To customize the welcome message, one can create a new script in this directory, for example:
1
sudo nano /etc/update-motd.d/99-custom-welcome
In my case, I just want to display some fancy ASCII art and a custom message. I asked ChatGPT to write a script which displays a random ASCII art from several candidates: