How to change the Message of the Day (MOTD) on Red Hat?

Changing the default message of the day can be quite important to systems that require warnings or messages fed back to the user on login or attempted login. This short article will show you exactly what to do to get these messages applied to Red Hat operating systems.

For messages to be presented at login:

To enable this in SSH you have to follow this simple steps:

1. Create a /etc/issue.net file and fill it with the desired context.

The content of this file is shown when a ssh session is connected and before the authorization. You can use something similar to as follows:

********************************************************************
*                                                                  *
* This system is for the use of authorized users only.  Usage of   *
* this system may be monitored and recorded by system personnel.   *
*                                                                  *
* Anyone using this system expressly consents to such monitoring   *
* and is advised that if such monitoring reveals possible          *
* evidence of criminal activity, system personnel may provide the  *
* evidence from such monitoring to law enforcement officials.      *
*                                                                  *
********************************************************************

2. Edit /etc/ssh/sshd_config, and add the following line: Banner /etc/issue.net

3. The SSH service (sshd) will then need to be restarted, service sshd restart

For messages to be presented after login:

Similiar steps to the above and there is no need to restart any services as this works without enabling it.

1. Edit the /etc/motd file and fill it with the desired content.

Leave a Reply

Your email address will not be published. Required fields are marked *

*