Setup Banner on Console and Remote login CentOS/RHEL 6

Example add below banner.


********************************************************************
*                                                                  *
* This system is for the use of authorized users only.  Usage of   *
* this system may be monitored and recorded by system personnel.   *
*                                                                  *
* Unauthorized access to this machine is prohibited                *
* Press Ctrl+D if you are not an authorized user                   *
*                                                                  *
* Anyone using this system expressly consents to such monitoring   *
* and is advised that if such monitoring reveals possible          *
* evidence of criminal activity, system personnel may provide the  *
* evidence from such monitoring to law enforcement officials.      *
*                                                                  *
********************************************************************


Steps SSH console login banner CentOS/RHEL 6:
– Login as root.
– Edit in /etc/motd insert the banner message then save.
# vi /etc/motd

Steps SSH remote login banner CentOS/RHEL 6
– Login as root
– Edit in /etc/issue.net insert the banner message then save.
# vi /etc/issue.net
– Edit /etc/sshd/sshd_config
# vi /etc/sshd/sshd_config

Banner /etc/issue.net

-Restart sshd service
# service sshd restart

Reference:
https://wiki.centos.org/TipsAndTricks/BannerFiles


Related posts:

Leave a Reply

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