Home > linux > How to: Display pre-login banner on your SSH server

How to: Display pre-login banner on your SSH server

We all know the infamous /etc/motd which displays the message of the day on a unix system after the user has logged in. However, not too many know that there is a way to display a banner with some message before a user logs in via SSH to the system.

To display some sort of banner to the users before they login to your server via SSH, make the following changes:

# echo "This is system xyz.com, all activity is monitored!" >> /etc/ssh-banner

Open the sshd config file located at /etc/ssh/sshd_config and add or edit the line that starts with “Banner”:

Banner /etc/ssh-banner

Simply restart sshd service and that should do it!

Categories: linux Tags: ,