Unwanted spam on Ubuntu ssh login (and how to stop it)

Although I’m normally a Debian person, I run Ubuntu Server on a couple of machines.

It made sense at the time, but boy is some of Ubuntu’s spam* annoying me.

*At least, I consider it to be spam.

Spam on ssh login

When I log in via ssh, there’s spam.

Today, it was:

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

Why on earth would I - or anyone else - want this kind of spam coming up when I log in.

Worse, it’s not even locally-served, spam.

It is served by /etc/update-motd.d/50-motd-news, which is enabled by /etc/default/motd-news.

It calls out to https://motd.ubuntu.com (again, configurable in /etc/default/motd-news).

I am unconvinced that a call out to an Ubuntu server for spam, every time I log in to my machine, is necessary or desirable.

Now, I’ve had this server running for a long time, so it is possible that I opted in to this when I set it up. But that seems very unlikely.

Easy to disable, but that’s not really the point.

ESM / Ubuntu Pro spam

More spam!

  • Introducing Expanded Security Maintenance for Applications. Receive updates to over 25,000 software packages with your Ubuntu Pro subscription. Free for personal use.

    https://ubuntu.com/pro

This one comes from /etc/update-motd.d/88-esm-announce.

There is also /etc/update-motd.d/91-contract-ua-esm-status, which has related spam if you haven’t signed up for Ubuntu Pro.

Spam after apt upgrade

After calculating apt upgrade, I get this:

#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#

“News about significant security updates”? Seems reasonable enough, in an update tool.

Features? Services? Sounds like spam to me.

And why would I would a message about “teasing /r/Linux ;)” on by default?

Heck, I don’t even know what “/r/Linux” is, let alone informed as to why I would want to be teased about it.

Again, easy to change, but, again - at least, again, as far as I can remember - enabled by default.

Ubuntu Pro spam here too!

The following security updates require Ubuntu Pro with ’esm-apps’ enabled: maven libmaven3-core-java Learn more about Ubuntu Pro at https://ubuntu.com/pro

This one is controlled by /etc/apt/apt.conf.d/20apt-esm-hook.conf.

</GrumpyOldDebianUser>