banner

How To Set Up BANNER

           IF U WANT TO SEE THE BANNER BEFORE LOGIN THIS IS PROCEDURE

[root@ORACLE ~]# cat /etc/issue.net 
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Kernel \r on an \m

[root@ORACLE ~]# cat >> /etc/issue.net 
####################################
#########WRITE WHAT EVER U WANT TO RIGHT#########
########################################################

[root@ORACLE ~]# cat /etc/issue.net 
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Kernel \r on an \m
####################################
#########WRITE WHAT EVER U WANT TO RIGHT#########
########################################################

[root@ORACLE ~]# cat /etc/ssh/sshd_config | grep Banner
#Banner none

edit the file as per requirement

[root@ORACLE ~]# nano /etc/ssh/sshd_config 

[root@ORACLE ~]# cat /etc/ssh/sshd_config | grep Banner
Banner /etc/issue.net

[root@ORACLE ~]# service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]

[root@ORACLE ~]# reboot 
Broadcast message from root@ORACLE
(/dev/pts/0) at 18:40 …
The system is going down for reboot NOW!
[root@ORACLE ~]# Connection to 172.16.28.168 closed by remote host.
Connection to 172.16.28.168 closed.
mohammedrafi@NOC-RAFI:~$ ssh root@172.16.28.168
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Kernel \r on an \m
####################################
#########WRITE WHAT EVER U WANT TO RIGHT#########
########################################################
root@172.16.28.168’s password: 
Last login: Thu Mar 31 18:34:12 2016 from 172.16.28.1
====================================================================
           IF U WANT TO SEE THE BANNER AFTER LOGIN THIS IS PROCEDURE

[root@ORACLE ~]# cat /etc/motd 
 
edit the file as per requirement
 
[root@ORACLE ~]# nano /etc/motd 
 
[root@ORACLE ~]# cat /etc/motd 
######### This server is related to some X purpose if u are wrongly logged in just logout ######
[root@ORACLE ~]# reboot
Broadcast message from root@ORACLE
(/dev/pts/0) at 18:51 …
The system is going down for reboot NOW!
[root@ORACLE ~]# Connection to 172.16.28.168 closed by remote host.
Connection to 172.16.28.168 closed.
mohammedrafi@NOC-RAFI:~$ ssh root@172.16.28.168
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Kernel \r on an \m
####################################
#########WRITE WHAT EVER U WANT TO RIGHT#########
########################################################
root@172.16.28.168’s password:
Last login: Thu Mar 31 18:43:12 2016 from 172.16.28.1
###### This server is related to some X purpose if u are wrongly logged in just logout ######

======================================================================
IF U WANT SOME BETTER BANNER USE THIS

[root@ORACLE ~]# yum provides figlet
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
figlet-2.2.5-9.el6.x86_64 : A program for making large letters out of ordinary text
Repo        : epel
Matched from:

[root@ORACLE ~]# yum install figlet-2.2.5-9.el6.x86_64
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package figlet.x86_64 0:2.2.5-9.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
Package                          Arch                             Version                                  Repository                      Size
=================================================================================================================================================
Installing:
figlet                           x86_64                           2.2.5-9.el6                              epel                           123 k

Transaction Summary
=================================================================================================================================================
Install       1 Package(s)

Total download size: 123 k
Installed size: 654 k
Is this ok [y/N]: y
Downloading Packages:
figlet-2.2.5-9.el6.x86_64.rpm                                                                                             | 123 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : figlet-2.2.5-9.el6.x86_64                                                                                                     1/1
Verifying  : figlet-2.2.5-9.el6.x86_64                                                                                                     1/1

Installed:
figlet.x86_64 0:2.2.5-9.el6

Complete!

[root@ORACLE ~]# figlet HOW ARE U
 _   _  _____        __     _    ____  _____   _   _ 
| | | |/ _ \ \      / /    / \  |  _ \| ____| | | | |
| |_| | | | \ \ /\ / /    / _ \ | |_) |  _|   | | | |
|  _  | |_| |\ V  V /    / ___ \|  _ <| |___  | |_| |

|_| |_|\___/  \_/\_/    /_/   \_\_| \_\_____|  \___/

COPY THIS AND PASTE IN CONFIGURATION FILE IF U WANT

[root@ORACLE ~]# cat /etc/motd 
######### This server is related to some X purpose if u are wrongly logged in just logout ######

 _   _ _____ _     _     ___  
| | | | ____| |   | |   / _ \ 
| |_| |  _| | |   | |  | | | |
|  _  | |___| |___| |__| |_| |
|_| |_|_____|_____|_____\___/ 
                              

[root@ORACLE ~]# reboot

Broadcast message from root@ORACLE
(/dev/pts/0) at 19:10 …

The system is going down for reboot NOW!
[root@ORACLE ~]# Connection to 172.16.28.168 closed by remote host.
Connection to 172.16.28.168 closed.
mohammedrafi@NOC-RAFI:~$ ssh root@172.16.28.168
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Kernel \r on an \m
####################################
#########WRITE WHAT EVER U WANT TO RIGHT#########
########################################################
root@172.16.28.168’s password:
Last login: Thu Mar 31 18:55:59 2016 from 172.16.28.1
######### This server is related to some X purpose if u are wrongly logged in just logout ######

 _   _ _____ _     _     ___  
| | | | ____| |   | |   / _ \ 
| |_| |  _| | |   | |  | | | |
|  _  | |___| |___| |__| |_| |
|_| |_|_____|_____|_____\___/ 
                              

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s