LOGO

Change SSH Welcome Banner on Ubuntu - Customize Your Server

August 12, 2007
Change SSH Welcome Banner on Ubuntu - Customize Your Server

Customizing the SSH Login Message on Ubuntu

Upon establishing a connection to my Ubuntu development server via an ssh client, a recurring message was displayed. Desiring a more personalized experience, I undertook the process of altering this message to a preferred alternative.

The original message presented upon login was as follows:

Linux superfast 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64 The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed geek@superfast:~$

Modifying the Message of the Day

Customizing this login message necessitates modifications to two distinct files. The initial portions of the message can be altered by editing the file located at:

/etc/motd

This file encompasses the Linux kernel version and the Ubuntu warranty disclaimer. Considering this information to be of limited personal utility, I opted to remove its contents and replace them with a custom message.

Disabling the Last Login Timestamp

To suppress the display of the last login timestamp – a practice not generally advised – the following file requires editing with sudo privileges:

/etc/ssh/sshd_config

Within this file, locate the line:

PrintLastLog yes

and modify it to:

PrintLastLog no

This change results in a blank prompt upon login. However, retaining the last login information is recommended for enhanced system security, as it provides a valuable audit trail.

The Resulting Login Prompt

Following these adjustments, my login prompt now appears as follows:

This is a superfast system. Please max out the cpu accordingly. Last login: Mon Aug 13 01:24:14 2007 from ipaddress removed geek@superfast:~$

Linux is a truly exceptional operating system.

#SSH#Ubuntu#welcome banner#SSH banner#server security#customize SSH