How to disable ssh motd welcome message on Ubuntu Linux

Here’s how you can disable the SSH Message of the Day (MOTD) welcome message on Ubuntu Linux:

  1. Open a terminal and log in to your Ubuntu Linux system.
  2. Create a new file in the /etc/pam.d directory using the following command:
sudo nano /etc/pam.d/sshd
  1. Add the following line to the file:
session optional pam_motd.so
  1. Save the changes and exit the Nano text editor.
  2. Restart the SSH service to apply the changes:
sudo service ssh restart

The SSH Message of the Day welcome message should now be disabled and will no longer be displayed when you log in via SSH.

Leave a Comment