Wednesday, October 23, 2013

LinuxAMI motd

I wanted some more info when logging into my LinuxAMI in AWS, here is my motd-script:

wget -O - > /usr/local/bin/dynmotd
chmod +x /usr/local/bin/dynmotd
echo "
# Dynamic Sysstats at each login
" >> /etc/profile
unlink /etc/motd

Remove cronjob for motd which is not needed anymore. Disable Printmotd in sshd_config and make sure pam.d has disabled. In a new LinuxAMI these commands do the job:

rm -f /etc/cron.daily/update-motd
sed -i 's/#PrintMotd\ yes/PrintMotd\ no/g' /etc/ssh/sshd_config

Now you can use figlet for example and change you Bannertext in /usr/local/bin/dynmotd
You could also use this instead of "echo 'TEXT'" in your /usr/local/bin/dynmotd

figlet `hostname -s`

No comments:

Post a Comment