1

I just installed Ubuntu 17.04 using the netinstaller (UEFI).

After connecting via SSH to the machine I see the 12.04 end-of-life warning.

Is this a bug and can I somehow remove it?

Using username "anonymous".
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Ubuntu 12.04 LTS ('precise') end-of-life was April 28, 2017
   ongoing security updates for 12.04 are available with Ubuntu Advantage
   http://j.mp/U1204esm

Last login: Wed May 10 08:24:24 2017 from 8.8.8.8
anonymous@private-server:~$
feedc0de
  • 111
  • 2
  • 9

1 Answers1

1

The welcome messages are generated by the files residing in /etc/update-motd.d/.

From man update-motd:

Executable scripts in /etc/update-motd.d/* are executed by pam_motd(8) as the root user at each login, and this information is concatenated in /var/run/motd.

So if you don't want the outputs of those scripts upon login via ssh just remove the execute flag on them:

sudo chmod -x /etc/update-motd.d/*

Now if you want to show something you want upon login, you have two options:

  • Make a script, put it in /etc/update-motd.d/, make it executable, also make sure it outputs on STDOUT.

  • ssh has a Banner option. You can put the text in a file and set it in the Banner option so that the content of the file is shown upon login via ssh. Note that this is applicable to only ssh.

    Banner /etc/foobar
    

    From man 5 sshd_config:

     Banner  The contents of the specified file are sent to the remote user
             before authentication is allowed.  If the argument is “none” then
             no banner is displayed.  This option is only available for
             protocol version 2.  By default, no banner is displayed.
    
2707974
  • 10,553
  • 6
  • 33
  • 45