Disable the MOTD From Displaying When Logging Into an Ubuntu Server Over SSH

Ever logged into an Ubuntu box and seen this?

Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-112-generic x86_64)

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

  System information as of Wed Aug 12 16:49:53 CEST 2020

  System load:  0.0                Processes:            88
  Usage of /:   25.1% of 18.72GB   Users logged in:      0
  Memory usage: 16%                IP address for eth0:  1.1.1.1
  Swap usage:   0%                 IP address for ens10: 10.0.0.12

 * Are you ready for Kubernetes 1.19? It's nearly here! Try RC3 with
   sudo snap install microk8s --channel=1.19/candidate --classic

   https://microk8s.io/ has docs and details.

 * Canonical Livepatch is available for installation.
   - Reduce system reboots and improve kernel security. Activate at:
     https://ubuntu.com/livepatch

0 packages can be updated.
0 updates are security updates.


Last login: Fri Aug  7 18:07:44 2020 from 1.1.1.1

You can configure /etc/pam.d/sshd to not include the pam_motd.so module when logging in. Just hash out the following lines in /etc/pam.d/sshd

session    optional     pam_motd.so  motd=/run/motd.dynamic noupdate
session    optional     pam_motd.so # [1]

Sistem Uzmanı, Linux Hacısı, El-Kernel

Yorum yapın