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.
- Open
/home/<user>/.bash_profile. - Append the following command
to access the banner message:
cat /home/<user>/banner - Save and exit the
.bash_profilefile. - Open the
/home/<user>/bannerand enter the custom log in message you want to use. - Save and exit the
/home/<user>/bannerfile. - 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.- Open
/etc/ssh/sshd_config. - Search for the keyword Banner in the file.
- Remove the hash symbol (#)
before Banner and set the path to the banner.
Banner /etc/banner - Save and exit the
/etc/ssh/sshd_configfile. - Open the
/<filepath>/bannerfile and enter the custom log in message you want to use. - Restart the sshd service by executing the service sshd restart command.
- Save and exit the file.
- Exit the current session and start a new one. The newly created banner message displays.