If you would like to display a simple message when users ssh into a machine, then you will have to edit the /etc/issue.net file and add your display message such as
$sudo vi /etc/issue.net
#################################################
##### All connections are monitored and recorded #####
#Disconnect IMMEDIATELY if you are not an authorized user!#
#################################################
After you add your custom message, you can turn on the banner in /etc/ssh/sshd_config file and enable the banner
$sudo vi /etc/ssh/sshd_config
************
# no default banner path
#Banner none
Banner /etc/issue.net
************
Next, restart sshd process
$sudo /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
Now when you log out and log back in you will see your banner getting displayed.
$sudo vi /etc/issue.net
#################################################
##### All connections are monitored and recorded #####
#Disconnect IMMEDIATELY if you are not an authorized user!#
#################################################
After you add your custom message, you can turn on the banner in /etc/ssh/sshd_config file and enable the banner
$sudo vi /etc/ssh/sshd_config
************
# no default banner path
#Banner none
Banner /etc/issue.net
************
Next, restart sshd process
$sudo /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
Now when you log out and log back in you will see your banner getting displayed.
No comments:
Post a Comment