Make mosh print the message of the day on Ubuntu 14.04

By devin, 26 November, 2015

I'm running mosh 1.2.4 on my Ubuntu server, and it's always annoyed me that it doesn't print the message of the day (MOTD) on startup. ssh prints helpful information when you log in, like if you need to reboot or update packages, that I miss when logging in via mosh.

So you can imagine my surprise when I found out that this issue was fixed in version 1.2 of mosh, 4 versions ago!

It turns out Ubuntu does something funky with the message of the day files and I guess mosh got confused. Running the following command fixed it for me:

sudo ln -s /var/run/motd.dynamic /etc/motd

This creates a symbolic link at /etc/motd that will be correctly populated with Ubuntu's crazy message of the day. Now I am politely welcomed every time I log in via mosh :) 

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.