5

When I login to my server terminal over ssh I just see:

Using username "username".
Ubuntu 14.04.1 LTS
Authenticating with public key "mykey" from agent
Last login: Wed Oct 22 09:17:02 2014 from xxx.xxx.xxx.x

The login should normaly tell me something like this:

    Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-33-generic x86_64)
    * Documentation:  https://help.ubuntu.com/
6 packages can be updated.
0 updates are security updates.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Why is that, how an where should I change settings so that available updates are shown when logging to terminal shell?

This update notification was working OK but it just stopped a week ago or so. Maybe I did some stupid change that I am not aware of.

I hope someone can help me about this issue.

chaos
  • 28,186

2 Answers2

5

Thats the message of the day (motd). Check if the file /etc/motd is existing and has content. When typing:

cat /etc/motd

...you should see the message like this:

Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-58-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

115 packages can be updated.
115 updates are security updates.

Probably that file is empty in your case. The following packages need to be installed that the file is updated periodically:

base-files
update-notifier-common 

You can force recreation of the file with this command:

run-parts /etc/update-motd.d/

Edit:

The manpage of pam_motd says that there is a flag called noupdate to prevent updateing the motd. Edit the file /etc/pam.d/sshd. In the file edit the line:

session    optional     pam_motd.so  motd=/run/motd.dynamic noupdate

to:

session    optional     pam_motd.so  motd=/var/run/motd
chaos
  • 28,186
0

This article solved the problem for me with no muss and no fuss on Ubuntu 16.04. Except the part about having to delete and recreate the /etc/update-motd.d directory; that seems to have been misguided.

But basically:

apt-get install lsb-release figlet update-motd 

seems to have done it for me on 16.04

rfay
  • 101