Customizing a Log In Banner

The ISR supports customizing welcome banners for users and user groups when logging into the system.

There are two options to customize a log in banner on the ISR, using the .bash_profile or using the sshd_config.

To enable a customized log in banner using the .bash_profile:

Note:

Each user has a .bash_profile in the /home/<user>/ directory. If the user is a root user, the .bash_profile is present in the /root directory.
  1. Open /home/<user>/.bash_profile.
  2. Append the following command to access the banner message:
    cat /home/<user>/banner
  3. Save and exit the .bash_profile file.
  4. Open the /home/<user>/banner and enter the custom log in message you want to use.
  5. Save and exit the /home/<user>/banner file.
  6. Exit the current session and start a new one. The newly created banner message displays.
To enable a customized log in banner using the sshd_config:

Note:

Only root users, or users with sudo permissions, have editing permissions.
  1. Open /etc/ssh/sshd_config.
  2. Search for the keyword Banner in the file.
  3. Remove the hash symbol (#) before Banner and set the path to the banner.
    Banner /etc/banner
  4. Save and exit the /etc/ssh/sshd_config file.
  5. Open the /<filepath>/banner file and enter the custom log in message you want to use.
  6. Restart the sshd service by executing the service sshd restart command.
  7. Save and exit the file.
  8. Exit the current session and start a new one. The newly created banner message displays.