Operations 4 min read

Display a Custom SSH Login Banner or ASCII Art on Linux in Minutes

Learn how to enable OpenSSH's Banner option on a CentOS 7 system, create a custom banner file (including ASCII art generated with figlet), and restart the sshd service so every SSH login shows your personalized message.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Display a Custom SSH Login Banner or ASCII Art on Linux in Minutes

OpenSSH provides a built-in Banner option that, when configured, sends the contents of a specified file to the remote user before authentication. By default this option is disabled, so no banner appears during SSH login.

System Environment

CentOS 7

Enabling the Banner

Log into the remote Linux system.

Edit the SSH daemon configuration file /etc/ssh/sshd_config. # vim /etc/ssh/sshd_config Append the following line to the end of the file: Banner /etc/ssh/my_banner Save the file and exit the editor.

Create the banner file that will be displayed: # touch /etc/ssh/my_banner Restart the SSH service to apply the changes:

# systemctl restart sshd

Adding ASCII Art to the Banner

You can either copy an ASCII‑art image you like or generate one with the figlet utility. Install figlet (requires the EPEL repository) and create the art:

# yum -y install figlet
# figlet LinuxProbe > /etc/ssh/my_banner

Alternatively, you can paste any ASCII art directly into /etc/ssh/my_banner.

Testing the Banner

Connect via SSH to see the banner in action: # ssh root@localhost The custom message or ASCII art will be displayed before the login prompt.

Conclusion

This simple feature enhances the terminal experience and can also be used with the /etc/motd file for system‑wide messages.

Linux system showing SSH login banner
Linux system showing SSH login banner
Figlet generated ASCII art
Figlet generated ASCII art
SSH login displaying the custom banner
SSH login displaying the custom banner
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem AdministrationSSHOpenSSHASCII artBanner
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.