Pre-login Message / Banner Configuration in Linux

Banner is used to display  welcome message while login to the particular system which may includes warning for unauthorized users and agreement for the user who used to login to the system.

Create a text file with banner description

#vi /etc/ssh/ssh-banner-message.txt


WARNING: Unauthorized access to this system is forbidden and will be prosecuted by law. By accessing this system, you agree that your actions may be monitored if unauthorized usage is suspected

# edit below line in /etc/ssh/sshd-config file

Banner /etc/ssh/ssh-banner-message.txt

#service sshd restart

SSH Login with any user :

Now it will show the pre-login message.

No comments:

Post a Comment