0

When I connected to my RPi using ssh, I always had a line up there like

Linux airpi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l

but suddenly it's gone now. Where can I check if it's enabled? :/

0

It's the date and time that kernel was compiled, not the current date and time. What you're seeing is the output of the uname command.

/etc/init.d/motd calls it and outputs it to /var/run/motd.dynamic

uname -snrvm > /var/run/motd.dynamic

Bash allows you to suppress display of the MOTD by creating a file in your home directory called .hushlogin.

If you don't have a .hushlogin, maybe /etc/init.d/motd was disabled, or the symlink to it in the appropriate /etc/rc#.d directory was removed.

  • Aahh, you're right! I don't have a .hushlogin file in my home directory and there are 5 symlinks in the /etc/rc*.d directories, so how can I check if /etc/init.d/motd is enabled or enable it at all? – Exceen Apr 2 '15 at 17:26
  • Each of the symlinks in the /etc/rc#.d directories should point to something in the /etc/init.d directory. The # equates to a run level, and 2 is the default runlevel. init will go through and run the scripts in order, starting in /etc/rcS.d and then going to /etc/rc2.d. The K scripts are kill, init calls them with the stop argument. The S scripts are start. So if there's no /etc/rc2.d/S01motd then /etc/init.d/motd won't be called. – mazianni Apr 2 '15 at 17:28
  • See also this link for more about hushlogin. debian-administration.org/article/546/… – mazianni Apr 2 '15 at 17:36
-1

This article describes how to disable/enable/change the welcome message: https://serverfault.com/questions/407033/how-can-i-edit-the-welcome-message-when-ssh-start

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Steve Robillard Mar 31 '15 at 2:04
  • I can't find an answer to my question in your link. This is not a static message I'm talking about. It includes the date and time as well for instance. – Exceen Mar 31 '15 at 10:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.