How to display or change the welcome message in Linux terminal after logging in with SSH?
- 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: 10.0.2.15 private ip: 18.104.22.168 Hostname: andreyex.ru 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.
- Open the / etc / ssh / sshd_config file for editing.
- Find PrintLastLog and replace the value from Yes to No. Save and exit.
You can add / modify the SSH login welcome message on the main body of the standard distribution as described above.