SSH Banner Message
This post was published 2 years 9 months 13 days ago which may make its actuality or expire date not be valid anymore. This site is not responsible for any misunderstanding.If you would like to display a login banner for SSH users on RHEL, you can. This is quite easy, however, this isn’t the same as a message of the day (MOTD) banner; which is why this post even exists. Usually the file for the banner is located at /etc/banner.
To actually implement (or remove) the banner message you would just add (or remove) the Banner stanza in the sshd_config file for your SSH server. This is usually located in /etc/ssh/sshd_config.
Non-Configured (disabled) Banner
cat /etc/ssh/sshd_config | grep -i Banner Banner none |
OR
cat /etc/ssh/sshd_config | grep -i Banner #Banner none |
Configured Banner
cat /etc/ssh/sshd_config | grep -i Banner Banner /etc/banner |