본문 바로가기

리눅스

[리눅스] Ubuntu에서 motd 메시지를 비활성화하는 방법(.hushlogin)

728x90

Ubuntu에서 motd 메시지를 비활성화하는 방법(.hushlogin)

 MOTD = Message Of The Day

터미널 로그인

ssh test-server
Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-30-generic x86_64)

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

  System information as of Sun May 22 12:54:54 PM KST 2022

  System load:                      0.0
  Usage of /:                       24.1% of 44.97GB
  Memory usage:                     64%
  Swap usage:                       1%
  Processes:                        262
  Users logged in:                  0
  IPv4 address for br-3d8ea60954a0: 192.168.224.1
  IPv4 address for br-a7ad4eb9f84c: 172.18.0.1
  IPv4 address for docker0:         172.17.0.1
  IPv4 address for ens160:          172.30.1.217

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 updates can be applied immediately.


Last login: Fri May 20 20:36:24 2022 from 172.30.1.217
testuser@test-server:~$

motd 메시지를 비활성화하는 방법

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

(or)

touch ~/.hushlogin

motd 파일 생성

echo "hello!" > /etc/motd

터미널 로그인

ssh test-server
hello!
Last login: Sun May 22 18:56:41 2022 from 172.30.1.217
testuser@test-server:~$

 

728x90