This article describes how to configure a pre-login banner for Junos Space WebGUI/UI and CLI.
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.
Update the file [/var/www/html/banner/banner.html] with your custom banner message.
[/var/www/html/banner/banner.html
]
Execute the script in the location /var/www/cgi-bin/changeUserInterfaceBanner.pl .
/var/www/cgi-bin/changeUserInterfaceBanner.pl
perl changeUserInterfaceBanner.pl Usage: perl changeUserInterfaceBanner.pl action=[enable|disable]
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
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!
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
To validate that the banner configuration has been changed, run the following command: less /etc/ssh/sshd_config | grep -i banner
less /etc/ssh/sshd_config | grep -i banner
2019-05-18: Added instructions for adding a banner via the CLI.