Customize your SSH connection with motd message

Today an article of customization at your SSH connection. Un peu d’esthétique ne fera pas de mal 🙂

motd-2

When you connect to the Raspberry in SSH either by opening a terminal under X you have the ability to display a particular message whose content lies in the file /etc/motd.

We will modify this message to get the message of the image above.

  1. Create a script (Home /root/update_motd.sh) with the content of This file (the file has a .doc extension but it is .txt because wordpress.com hosting).

    The script will write to the/etc/motd file. However you may have to add spaces at the beginning of line to align everything.

    Personnaliser votre message de connexion SSH avec motd

    Customize your SSH connection with motd message – Screenshot because that do not pass on this blog …

  2. Set up a regular updating of the file/etc/motd via a job in crontab. Start the command crontab-e and copy the following line at the end of file :
    */10 * * * * /root/update_motd.sh

    The script will run all the 10 minutes

Et voilà 🙂

Sources :

Like this article ? Bear with me on patreon!

You may also like...