How-to Display a Warning Banner Before the Login Prompt

It is best to have a warning banner displayed before a user is logged in.  Below is how you will implement this task.

Microsoft

1) By default sshd server turns off this feature.

2) Login as the root user; create your login banner file:

# vi /etc/ssh/sshd-banner

Append text:
* * * * * * * * * * W A R N I N G * * * * * * * * * *

This computer system is the property of XYZ. It is for authorized use only.  By using this system, all users acknowledge notice of, and agree to comply with XYZ’s Acceptable Use of Information Technology Resources Policy (“AUP”).  Unauthorized or improper use of this system may result in administrative disciplinary action, civil charges/criminal penalties, and/or other sanctions as set forth in XYZ’s AUP. By continuing to use this system you indicate your awareness of and consent to these terms and conditions of use.

If you are physically located in the European Union, you may have additional rights per the GDPR. Visit the web site dataprivacy.utk.edu for more information.

LOG OFF IMMEDIATELY if you do not agree to the conditions stated in this warning.

* * * * * * * * * * * * * * * * * * * * * * * *

3) Open sshd configuration file /etc/sshd/sshd_config using a text editor:

# vi /etc/sshd/sshd_config

4) Add/edit the following line:

Banner /etc/ssh/sshd-banner

5) Save file and restart the sshd server:

# /etc/init.d/sshd restart

6) Test your new banner (from Linux or UNIX workstation or use any other ssh client):

$ ssh user@host

 

Output:

* * * * * * * * * * W A R N I N G * * * * * * * * * *

This computer system is the property of XYZ. It is for authorized use only.  By using this system, all users acknowledge notice of, and agree to comply with XYZ’s Acceptable Use of Information Technology Resources Policy (“AUP”).  Unauthorized or improper use of this system may result in administrative disciplinary action, civil charges/criminal penalties, and/or other sanctions as set forth in XYZ’s AUP. By continuing to use this system you indicate your awareness of and consent to these terms and conditions of use.

If you are physically located in the European Union, you may have additional rights per the GDPR. Visit the web site dataprivacy.utk.edu for more information.

LOG OFF IMMEDIATELY if you do not agree to the conditions stated in this warning.

* * * * * * * * * * * * * * * * * * * * * * * *

Be the first to comment

Leave a Reply

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

error: Content is protected !!