The login messages you get when you log into SSH or the console are actually a bunch of bash scripts in /etc/update-motd.d. You can modify these and customize them as you would like. For example, all of my Ubuntu servers include a line advertising landscape.canonical.com, which would be fine, but I’m just a home user and that’s a pay for service, so I’m not interested. It also has a link to documentation which I also don’t need to be reminded of every time.

Here is what the default server version login looks like:

Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-39-generic x86_64)

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

  System information as of Fri Nov 14 11:23:17 MST 2014

  System load:  0.0               Processes:           124
  Usage of /:   44.4% of 4.06GB   Users logged in:     0
  Memory usage: 6%                IP address for eth0: ip.address.here
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

Last login: Fri Nov 14 11:17:28 2014 from blahblah

The following instructions assume you are in the directory:

cd /etc/update-motd.d

To pare the long message down, I first started by moving the script that barks out the documentation link to my home directory (just in case I need it back, but it can also be deleted). You can move it wherever you want of course, but I don’t use my home directory in my servers for anything.

sudo mv 10-help-text ~

To remove some of the extra returns in the system information section, I edited 50-landscape-sysinfo and commented some of the echos:

sudo vim 50-landscape-sysinfo
#echo
echo -n "  System information as of "
/bin/date
#echo
/usr/bin/landscape-sysinfo

(# means comment, the script will ignore those lines).

To remove the “Graph this data and manage this system at:” lines, we will need to edit landscapelink.py instead (note, your path may very. It might also be python2.5 instead of python 2.7. use “locate landscapelink.py” to find it for sure).

sudo vim /usr/lib/python2.7/dist-packages/landscape/sysinfo/landscapelink.py

Change the following lines:

self._sysinfo.add_footnote(
    "Graph this data and manage this system at:\n"
    "    https://landscape.canonical.com/")

to:

#self._sysinfo.add_footnote(
#    "Graph this data and manage this system at:\n"
#    "    https://landscape.canonical.com/")

That wasn’t too bad. Now we have this upon login:

Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-39-generic x86_64)

  System information as of Fri Nov 14 12:31:55 MST 2014
  System load:  0.0               Processes:           110
  Usage of /:   51.8% of 5.54GB   Users logged in:     0
  Memory usage: 7%                IP address for eth0: ip.address.here
  Swap usage:   0%

Last login: Fri Nov 14 12:31:56 2014 from blahblahmachine

Much better, and much less screen taken up by extra crud. Of course, if you don’t care about the pretty information block, you can just move or delete the 50-landscape-sysinfo file from the directory.