Change Linux SSH Welcome message
This guide explains how to change the Linux Welcome message.
After each login via SSH a welcome message appears. If this text is annoying and/or you just want to change it, you can do this by two methods.
Change text-only welcome message
If a text-only greeting is sufficient, you should choose this variant. Shell commands cannot be executed with this variant.
sudo nano /etc/motd
Delete the old text and write our own text into it. Save with
CTRL + X followed by
Y close with
You can enhance your welcome message with ASCII text, a good generator can be found here.
Change welcome message via. Bash script
The far more powerful method is to use a Bash script. Among other things, colors can be specified for this purpose.
Additional commands can be added at the end of the file.
All desired outputs must be specified by command (e.g
echo) not as stand alone text!
sudo nano /etc/bash.bashrc
Colorizing Shell - echo
A complete guide on how to colorize text can be found here
Use the following command for writing colored text.
echo -e "\e[COLORmSample Text\e[0m"