Did you know? You can turn off the banner in Linux or Unix using a particular file. When you log in using ssh or other methods, you will find tons of information on the screen. Here is how my FreeBSD home server login looks:
Default motd with my hardware and other info
The first one is /etc/motd, and the second is the output of neofetch called from ~/.profile file. And my Ubuntu Linux box showing stuff too when I login using the ssh command:
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Saturday 15 May 2021 03:18:53 AM IST
System load: 1.01
Usage of /: 42.3% of 815.83GB
Memory usage: 30%
Swap usage: 0%
Temperature: 58.0 C
Users logged in: 1
IPv4 address for br0: 192.168.2.25
IPv4 address for lxdbr0: 10.83.200.1
IPv6 address for lxdbr0: fd42:87d0:ec52:7d50::1
IPv4 address for mum-wg0: 10.8.0.2
IPv6 address for mum-wg0: fd9d:bc11:4021::2
IPv4 address for virbr0: 192.168.122.1
3 devices have a firmware upgrade available.
Run `fwupdmgr get-upgrades` for more information.
1 update can be applied immediately.
To see these additional updates run: apt list --upgradable
Last login: Sat May 15 03:18:33 2021 from 127.0.0.1
Fear not, there is an easy way to hide this information.
How to turn off login banner in Linux or Unix with .hushlogin
First, create a new empty individual file in your login directory ($HOME) called ~/.hushlogin. At your Linux or Unix shell prompt, type the following touch command: touch ~/.hushlogin
That is all. Now try login using the ssh command: ssh email@example.com
What are motd and ~/.hushlogin files?
MOTD is an acronym for a message(s) of the day.
The file /etc/motd is normally displayed by login or ssh after a user has logged in. The contents are displayed before the shell is set up for your session. Traditionally sysadmin used this file to provide system-wide announcements. For instance, they are replacing the RAID array for rebooting the box for kernel upgrades. Here is how to display it using the cat command: cat /etc/motd
Individual users are allowed to suppress this file’s display by creating a file called .hushlogin in their home directories. The concept of /etc/motd was created as it requires much less disk space than mail to all users.
Turning off the login banner in Linux or Unix using .hushlogin file
I explained how to turn off the login banner in Linux, macOS, *BSD, and Unix-like systems. All you have to do is create a file in your $HOME directory. The banner /etc/motd does include essential information about your system, especially downtimes. When you make a ~/.hushlogin file, you will never see such info. But, you can manually see it using the more command or cat command: more /etc/motd
# freebsd specific #
# Ubuntu #
ls -l /etc/update-motd.d
Please note that Ubuntu Linux uses update-motd file, which is a dynamic MOTD generation tool. See “How to disable ssh motd welcome message on Ubuntu Linux” for more info. Check out motd and login man page by typing the following man command: man motd
The FreeBSD project released FreeBSD version 13. The new version comes with updated software and features for a wild variety of architectures. The latest release provides performance improvements and better support for FreeBSD. One can benefit greatly using an upgraded version of FreeBSD. Let us see what’s new and quickly update FreeBSD 12 to 13 using the CLI. [continue reading…]
The du (disk usage) command summarizes directory trees’ sizes, including all of their contents and individual files’ sizes on Linux and Unix-like systems such as macOS. It helps track down space hogs. In other words, we can list directories and files that consume large amounts of space on a hard disk drive. Let us see the ncdu command, a curses-based version of the well-known du command. [continue reading…]
The Debian GNU/Linux project has released an updated version of its stable Linux distribution Debian 10 (“buster”). You must upgrade to get corrections for security problem as this version made a few adjustments for the severe issue found in Debian version 10.8. Debian is a Unix-like (Linux distro) operating system and a distribution of Free Software. It is mainly maintained and updated through the work of many users who volunteer their time and effort. The Debian Project was first announced in 1993 by Ian Murdock. [continue reading…]
All supported versions of FreeBSD are affected by various security bugs that need to be applied ASAP. If the process is privileged, it may escape jail and gain full access to the FreeBSD system. Similarly, when using Xen, a malicious or buggy frontend driver may be able to cause resource leaks. Let us see what and how to fix these security vulnerabilities on FreeBSD. [continue reading…]
As you know, Red Hat recently announced that CentOS Linux 8, as a rebuild of RHEL 8, will end in 2021. CentOS Stream continues after that date, serving as the upstream (development) branch of Red Hat Enterprise Linux. The news met with a strong reaction from the open-source community and CentOS users. Today, Red Hat released a new option where RHEL developer subscriptions can now be used in production environments. The developers and team can have up to 16 systems. In other words, it is a no-cost RHEL that small groups and developers can use to build packages and in production environments. [continue reading…]
The last ten years in the computer and IT security world are crippled with so many vulnerabilities. We saw massive cloud computing adoption and end-users using mobile devices with high speed 4G LTE networks. A threat actor may have exploited such weakness in modern computers and networks. Let us look into top vulnerabilities and the attack surface in this decade (2010-2020) that affected Linux/Unix, macOS, IT, cloud-computing, and computers in general. [continue reading…]
A text editor is an essential tool for both developers and sysadmin, especially when dealing with text based sessions. We use a text editor to create, edit, and update text. A text editor is used for many things. Some use them to write documents. Some people write code and others use it to edit Linux and Unix configuration files locally or remote servers running in the cloud. Let us see the top 6 text editors for Linux, macOS, and Unix command-line users/developers. [continue reading…]
CentOS is an acronym for Community Enterprise Operating System, and it is a 100% rebuild of RHEL (Red Hat Enterprise Linux). While RHEL costs money, CentOS offered as a free community-supported enterprise Linux distro. Developers and companies who are good at Linux and don’t want to pay RHEL support fees always selected CentOS to save money and get enterprise-class software. However, the free ride is over. Red Hat announced that CentOS Linux 8, as a rebuild of RHEL 8, will end at 2021. CentOS Stream continues after that date, serving as the upstream (development) branch of Red Hat Enterprise Linux. [continue reading…]