Thursday 12 March 2015

MOTD banner on AWS EC2 Amazon Linux reverts to original after reboot

Permanently change the MOTD banner on AWS EC2 Amazon Linux

Changing the /etc/motd on  Amazon EC2 AMI only works until the image is rebooted. I only found this out after spending considerable time updating it with custom messages on numerous servers.

It is actually generated by a script at /usr/sbin/update-motd and the banner you see can be found at /etc/update-motd.d/30-banner. Turn off the update script with $ sudo update-motd --disable and then edit the banner at /etc/update-motd.