How to Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users

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.

Steps

  1. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 1
    1
    Sudo to root
  2. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 2
    2
    Type vim /etc/issue.net
  3. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 3
    3
    You will get a screen similar to the one shown
  4. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 4
    4
    Next 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.
  5. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 5
    5
    The issue.net file should now look as shown
  6. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 6
    6
    Now exit out of this file by saving the changes by typing EscKey + !wq
  7. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 7
    7
    Now let us make SSH understand that we need to enable the Banner Message.
  8. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 8
    8
    To do this, we issue the command, vim /etc/ssh/sshd_config
  9. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 9
    9
    Now in the sshd_config file, we need to uncomment the Banner portion as shown
  10. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 10
    10
    Now issue the command --> /etc/init.d/ssh restart
  11. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 11
    11
    This will restart the OpenSSH Server Daemon process
  12. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 12
    12
    After this is done, we can test it by issuing a test login via
  13. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 13
    13
    localhost by issuing the following command ssh localhost
  14. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 14
    14
    Type yes to connect
  15. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 15
    15
    Now you will get our Banner message
  16. Image titled Set Up a Custom Banner Message in Your Ubuntu Linux Machine for Remote Users Step 16
    16
    - Congratulations! You have successfully setup a Banner for your Linux System!

Article Info

Categories: Pages Needing Attention | Computer Emoticons Symbols and ASCII Art