Inside /etc/update-motd.d folder there are files as per number sequence they are called in ascending order of filenames.
Keep a backup of the folder and modify the files to achieve the result.
After editing the file, restart SSHD:
sudo /etc/init.d/ssh restart
Then to disable the last login message (which I don’t recommend doing), you will need to edit the following file in sudo mode:
/etc/ssh/sshd_config
Find this line in the file and change the yes to no as shown:
PrintLastLog no