This how-to will enable you to setup a custom banner message to users who read your Banner Message and decide to enter your System at their own risk, else be warned about not trying to log in.
We will be first editing a file called issue.net. This is where we will be typing our custom Banner Message. Then we will be editing the SSH_config file to point to this file. Once that is done, we can restart the SSH Daemon process for things to work.
EditSteps
-
1Sudo to root
-
2Type vim /etc/issue.net
-
3You will get a screen similar to the one shown
-
4Next just below the lines of Debian 6.0, I am using Debian, the same applies for Ubuntu - Type any custom message you feel, I usually would use something like this.
-
5The issue.net file should now look as shown
-
6Now exit out of this file by saving the changes by typing EscKey + !wq
-
7Now let us make SSH understand that we need to enable the Banner Message.
-
8To do this, we issue the command, vim /etc/ssh/sshd_config
-
9Now in the sshd_config file, we need to uncomment the Banner portion as shown
-
10Now issue the command --> /etc/init.d/ssh restart
-
11This will restart the OpenSSH Server Daemon process
-
12After this is done, we can test it by issuing a test login via
-
13localhost by issuing the following command ssh localhost
-
14Type yes to connect
-
15Now you will get our Banner message
-
16- Congratulations! You have successfully setup a Banner for your Linux System!
Article Info
Did this article help you?
Yes
No