There are two MOTD's shown when I login to my server using SSH
The MOTD can either be printed by sshd
, or by PAM. It's possible that both are doing it.
Check your /etc/ssh/sshd_config
for the following:
PrintMotd yes
If that line isn't present it may be defaulting to yes
(although Debian/Ubuntu change the default to no
).
Check your PAM configuration in /etc/pam.d/
for the following:
session optional pam_motd.so
Try disabling these one at a time to see what changes.
If you are using Ubuntu, you might try to:
sudo nano /etc/ssh/sshd_config
and check to see of PrintMotd
and UsePam
are both set to true, that was the case for me.
Note: Following the above, you can do sudo service ssh restart
and you should see just one Motd on login.