Ubuntu remove SSH welcome message

When you login to an Ubuntu server using SSH, we get welcome message

To disable MOTD on Ubuntu, just delete the scripts from /etc/update-motd.d/

First Method:

rm -f /etc/update-motd.d/*

If you want a differnt motd, you can put a shell script in this folder.

Second Method:

Disable motd is by disabling pam_motd.so module.

Edit files

/etc/pam.d/login
/etc/pam.d/sshd


Comment out the lines related to pam_motd.so

session    optional     pam_motd.so  motd=/run/motd.dynamic
session    optional     pam_motd.so noupdate







If you like please follow and comment