On Debian Wheezy the default openssh server package displays the motd from /etc/motd.
When i compile it from source (openssh-6.0p1) it won't display the motd anymore after an ssh login.
Configure options:

./configure --prefix=/usr --sysconfdir=/etc/ssh  --with-pam  --with-md5-passwords --with-kerberos5 --with-selinux --with-privsep-path=/var/run/sshd
  • UsePAM yes is enabled
  • No configs have been overwritten. Only the sshd binary.
  • pam_motd.so is loaded in the sshd process
  • source is from ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
  • source from apt-get source openssh works and displays the motd. It was compiled with the same configure arguments.

Which source parts are responsible for that difference?

This also applies to my Ubuntu machine.

Thanks in advance!

  • in the sshd_config file, probably under /etc/sshd, if you search for PrintMotd, what do you see ? – MelBurslan Jan 26 '16 at 18:36
  • PrintMotd yes/no doesn't affect the behavior on debian. Configs aren't changed btw – 5andr0 Jan 26 '16 at 18:50
  • can you see if selinux is preventing the sshd binary from reading /etc/motd? maybe it's trying, but is being prevented – Jeff Schaller Jan 26 '16 at 18:57
  • where do you install the built version? How do you start the server? Did you include the patches from Debain package? – Jakuje Jan 26 '16 at 19:08
  • Do you have Banner in /etc/ssh/sshd_config uncommented and pointing at /etc/motd while PrintMotd is enabled ? – cesar Jan 26 '16 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.