I recently did a fresh install of Ubuntu 14.04. When I SSH, there is no MOTD (and yes, I have the appropriate command set in sshd_config).
I read a bunch of tutorials about setting up MOTD, but I realized that while I have /etc/update-motd.d, there is not /etc/motd file nor a /var/run/motd file.
How can I set these up so that I can get a MOTD via SSH?
Best Answer
On a base install of Ubuntu 14.04.2 LTS, simply drop the message you want in:
By default, the MOTD will appear at the end of the other dynamic MOTD content. For example, here's the output from a Vagrant ubuntu/trusty64 (v20150506.0.0) box with a /etc/motd file added:
That's all there is to it if you're working on a system with the default settings.
Some other troubleshooting notes:
Using "/etc/motd" is a change from earlier versions. Recommendations for 12.02 were to use "/etc/motd.tail". That doesn't work in 14.04.2.
Other recommendations I've seen include changing some values in "/etc/ssh/sshd_config". In case those have been altered, here's the defaults that work:
Likewise, here are the defaults for the
/etc/pam.d/login
I've seen referenced:That's everything I've seen referenced for troubleshooting.