Knowledge Search


×
 

[Junos Space] Adding login banner to Junos Space WebGUI and CLI

  [KB33864] Show Article Properties


Summary:

This article describes how to configure a pre-login banner for Junos Space WebGUI/UI and CLI.

 

Solution:

Creating a banner to deliver pre-login messages to users on Junos Space WebGUI/UI

Note: This procedure is applicable to Junos Space version 17.2 and later.

  1. Log in to the CLI of VIP node.
  2. Update the file [/var/www/html/banner/banner.html] with your custom banner message.

  3. Execute the script in the location /var/www/cgi-bin/changeUserInterfaceBanner.pl.

perl changeUserInterfaceBanner.pl

Usage: perl changeUserInterfaceBanner.pl action=[enable|disable]
  1. Log in to Junos Space WebGUI/UI and verify that you are able to see the login banner as shown below with the custom message:

 

Creating a banner to deliver pre-login messages to users on Junos Space CLI

  1. Log in to the CLI of each Junos Space node.
  2. Create your custom banner message in the /etc folder.

        vi /etc/custom_banner

    Press "i" to edit the file, write your custom message, save the file by using ESC+wq!

  3. Run the following command to change the banner in the sshd_config file.

    sed -i 's/issue/custom_banner/g' /etc/ssh/sshd_config && /etc/init.d/sshd restart
    
    This sed command replaces the "issue" file with "custom_banner" created in step 2.
    The "issue" output is the default banner present in the sshd_config file which shows the version of the server as the banner.
  1. To validate that the banner configuration has been changed, run the following command:
          less /etc/ssh/sshd_config | grep -i banner

  2. Login to the Junos Space CLI using SSH and verify the configure banner.
Modification History:
2019-05-18: Added instructions for adding a banner via the CLI.
 
Related Links: