JooTC

Linux SSH에 연결한 뒤에 출력되는 각종 메시지 제거방법

Linux 로그인시 출력되는 메세지 제거하기


일반적으로 SSH 로그인 후에는 시스템 알림이나 마지막 로그인(Last Login) 로그가 표시됩니다.

  • Last login : 요일 월 일 시간 시간대 연도 on pts/1 (마지막으로 로그인한 유저 표시)
  • ABRT has detected 2 problem(s). For more info run: abrt-cli list –since 날짜 (ABRT 메시지)
  • You have net mail in /var/spool/mail/root (root 계정 로그인시 새로운 알림 메시지)
  • # packages can be updated. # updates are security updates. (업데이트 알림)

이처럼 다양한 알림메시지가 때로는 필요하지 않을 수 있습니다.

아래는 그 메시지를 로그인시에 표시하지 않는 방법입니다.

발생문제


// Ubuntu에서는 다음과 같은 메시지가 출력됩니다. (예시)

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.19.0-25-generic x86_64)

* Documentation: https://help.ubuntu.com/

13 packages can be updated.
12 updates are security updates.

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
WARNING: Security updates for your current Hardware Enablement Stack
ended on 2016-08-04:
* http://wiki.ubuntu.com/1404_HWE_EOL

There is a graphics stack installed on this system. An upgrade to a
configuration supported for the full lifetime of the LTS will become
available on 2016-07-21 and can be installed by running 'update-manager'
in the Dash.

*** System restart required ***
Last login: Fri Feb 3 09:11:17 2017 from 192.168.1.73

 

// CentOS에서는 다음과 같은 메시지가 출력됩니다. (예시)

Last login: Thu Feb  2 03:35:28 EST 2017 on pts/1

ABRT has detected 2 problem(s). For more info run: abrt-cli list --since 1486024529

 

 

해결방법


로그인할 유저의 home 디렉토리에 아래 파일을 만들어주시기만 하면 됩니다.

# .hushlogin 이라는 숨김 텍스트 파일을 현재 사용자의 홈 디렉토리(~)에 만듭니다.
touch ~/.hushlogin

 

부가적으로 ABRT 메시지는 아래 명령어로 제거할 수 있습니다. (주로 CentOS)

abrt-auto-reporting disabled

 

구독
알림
guest

2 Comments
Inline Feedbacks
모든 댓글 보기
못생긴푸우
못생긴푸우
4 년 전에

사라지지 않아요…ㅠ

2
0
이 포스트에 대한 의견을 남겨주세요!x
error: 콘텐츠 무단 사용, 도용 사례로 인해 복사가 제한됩니다. 링크(URL)첨부를 사용해주세요. (소스코드는 복사할 수 있어요)