How to display or change welcome message in Linux terminal

How to display or change the welcome message in Linux terminal after logging in with SSH?

  1. Open the file / etc / motd, for editing
# nano -c /etc/motd

2. Add content to a file that looks like the following. Save and exit.

Welcome to AndreyEx server. User related changes are in /opt/user.
public ip:
private ip:
Contact us: [email protected]

The next time you log into the server using SSH, you will be greeted with a welcome message /

Disable the last login message

It is not preferable to disable the last logon message as it affects security. Knowing all the security risks, if you still want to get rid of the last login message, you can follow the rest of the guide.

    1. Open the / etc / ssh / sshd_config file for editing.
    2. # /etc/ssh/sshd_config

    1. Find PrintLastLog and replace the value from Yes to No. Save and exit.
    2. PrintLastLog no

You can add / modify the SSH login welcome message on the main body of the standard distribution as described above.