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_config
) is 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.