Usually we have some banner in most of Operating system, Like I recently install Ubuntu 20.04 which have one banner message which contains very useful information with some stats about operating system.

So in this post we will try to remove banner from login message on Ubuntu 20.04 like it comes below while i login first time.

srv21 login: ssirohi
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-39-generic x86_64)

 * Documentation:
 * Management:
 * Support:

  System information as of Sun 28 Jun 2020 01:35:13 AM UTC

  System load:           0.0
  Usage of /:            21.3% of 19.56GB
  Memory usage:          9%
  Swap usage:            0%
  Processes:             89
  Users logged in:       1
  IPv4 address for ens3:
  IPv6 address for ens3: 2a02:c7f:c61f:5300:5054:ff:fe0d:48f5
  IPv6 address for ens3: fdec:aea1:e763:0:5054:ff:fe0d:48f5

39 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable

Last login: Sun Jun 28 01:25:31 UTC 2020 on ttyS0

Remove banner for user

In case we need to remove banner for specific user, we should touch .hushlogin through which we can get ride of welcome login.

touch ~/.hushlogin

This way this user interactive login on tty console will not get ant update banner on console while it login.

Ubuntu 20.04 LTS srv21 ttyS0

srv21 login: ssirohi

Disable ssh Login banner

In case we need to disable banner while login on ssh console. We can disable it through edit /etc/pam.d/sshd, for it need to edit below two lines

# Print the message of the day upon successful login.
# This includes a dynamically generated part from /run/motd.dynamic
# and a static (admin-editable) part from /etc/motd.
session    optional # motd=/run/motd.dynamic
session    optional # noupdate

So now we login through ssh, it comes like below

 ssirohi@jarvis  ~  ssh
ssirohi@'s password: 
Last login: Sun Jun 28 02:08:29 2020 from

Remove Banner file permission

Further if you like to remove banner permission which login banner which will work for all users, which in turn no news documentation and update new from Ubuntu website(canonical).

root@srv21:~# cd /etc/update-motd.d/
root@srv21:/etc/update-motd.d# chmod 600 *
root@srv21:/etc/update-motd.d# logout

Ubuntu 20.04 LTS srv21 ttyS0

srv21 login: root
Last login: Sun Jun 28 02:32:18 UTC 2020 on ttyS0

In above command we change permission of file inside /etc/update-motd.d and once permission is removed we can see there is no banner on login on tty console.

So, With above three methods, we can disable Ubuntu 20.04 login Banner.