How to add welcome message when SSH start?

You need to change the contents of /etc/motd. Unfortunately, by default, /etc/motd is a link to /var/run/motd which gets reset every time you log in. To make permanent changes, please do the following:

rm -rf /etc/motd
nano /etc/motd

or whatever editor you prefer. Then enter the message you want to be shown if any, and save the file.

Removing the "last seen" message (e.g., setting PrintLastLog to no in /etc/ssh/sshd_configis not recommended -- the time of the last login is valuable security information. It allows for a way to check if someone you did not expect has logged into the system recently. Anyway, it's possible but do so knowingly.

  • ssh, welcome, message
  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

How to restrict direct root access in Linux

We can do it just in two steps. Step One: At first we will create new root user as follows (for...

How to extract .tar.gz files in Linux/UNIX OS

A tarball is a group of files that are bundled together using the tar command. Use the...

How to change root password when SSH logged in

Run the following command: passwd Now type your new passwordOnce done, retype new passwordDone!...

How to install Pinguzo on any Linux/UNIX OS

Login to Pinguzo panel using Softaculous account or create an account of Pinguzo To add new...

How to use Postfix as Relay for Mailgun SMTP Relay

Mailgun is a popular SMTP Relay/API service, one of my favorites. For transactional emails, I...