Creating a SSH Warning Banner

To create warning banner, so whenever anyone attempts to SSH onto your server they will be greeted with a message.

1.Edit the / file

sudo nano /etc/

2. Enter your message:

I am such a hero, as I've got this to work XD

Although Access is limited to Authorized Individuals
If you are not Authorized please disconnect ASAP!!

All actions are recorded and monitored!

3. You will need to update, the ssh daemon configuration file

sudo nano /etc/ssh/sshd_config

4. Look for this line that starts with Banner, and delete the #. The should look like this:

Banner /etc/

5. Restart the ssh daemon

sudo service ssh restart

When next login you will be prompted with the message that you just wrote 😀

The following two tabs change content below.

Keeran Marquis

Network Engineer
Keeran Marquis is a Network Engineer. His main goal is to learn everything within the Networking field, pick up a little bit of scripting, be a poor man sysadmin and share whatever he knows! All Posts are his own views, opinions and experiences, no guarantees they will work for you but point you in the right direction 🙂
Share this:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.