Edit the /etc/issue.net file:
sudo nano /etc/issue.net

Here is mine banner as a sample, you can add your’s here:
###############################################################
# Authorized access only! #
# Disconnect IMMEDIATELY if you are not an authorized user!!! #
# All actions Will be monitored and recorded #
###############################################################

Open /etc/ssh/sshd_config file:
sudo nano /etc/ssh/sshd_config

Locate the line, that contains Banner and uncomment it as given below:
Banner /etc/issue.net

Restart sshd:
sudo service sshd restart

To configure the MOTD, we need to edit /etc/motd file:
sudo nano /etc/motd

Here is mine custom MOTD that I want to show to the users after login:
######################################
# If you are not authorized to access#
# or use this system, disconnect now #
######################################

Now, If we try to login, it will show us the warning banner as well as MOTD after login , that we just configured:

Hope this will help you!
No comments:
Post a Comment