How to Enable a Warning SSH Banner on CentOS 6.3

Share this Article :

This post covers the quick steps to enable a Warning SSH banner on CentOS 6.3. Step may be similar with other version of CentOS and Redhat Enterprise. The purpose of this banner is to show some messages or warning when a ssh session is connected and before the authorization. Follow the following steps :

1. Create a /etc/banner file and fill it with your desired message as below :

[[email protected] ~]# vi /etc/banner

Add the following :

Warning!! Only authorized System Administrator can access to this system..

2. Edit /etc/ssh/sshd_config and change the following :

# no default banner path
#Banner none


# default banner path
Banner /etc/banner

3. Restart sshd service :

[[email protected] ~]# service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]

4. Relogin to ssh session :

Leave a Reply