[RHEL/CentOS 8] Banner 문구 및 설정방법

2021. 10. 7. 11:18·Linux
728x90
반응형

리눅스 시스템에 로그인할 때와 성공했을때 배너를 설정하는 방법에 대해 설명합니다.

 

/etc/issue.net 파일에는 사용자가 ssh 접속을 시도할 때 나타나는 문장입니다.

 

/etc/motd 파일에는 원격 접속이 완료되면 나타나는 문자입니다.

 

 

 

1.  issue.net 파일에 내용 추가

[root@hk-tb etc]#vi /etc/issue.net

     ******************************************************************
     * This system is for the use of authorized users only. Usage of  *
     * this system may be monitored and recorded by system personnel. *
     * Anyone using this system expressly consents to such monitoring *
     * and is advised that if such monitoring reveals possible        *
     * evidence of criminal activity, system personnel may provide    *
     * the evidence from such monitoring to law enforcement officials.*
     ******************************************************************

 

 

2.  sshd_config 설정

[root@hk-tb etc]#vi /etc/ssh/sshd_config


# 설정 전
# no default banner path
#Banner none


# 설정 후 
# no default banner path
Banner /etc/issue.net

 

 

3.  sshd 서비스 재기동 및 ssh 접속 확인

ssh 접속시 설정한 배너가 출력되는 것을 확인할 수 있습니다.

[root@hk-tb etc]#systemctl restart sshd

[root@hk-tb etc]#exit


hkjeon@MacBook-Pro ~ % kvm
     ******************************************************************
     * This system is for the use of authorized users only. Usage of  *
     * this system may be monitored and recorded by system personnel. *
     * Anyone using this system expressly consents to such monitoring *
     * and is advised that if such monitoring reveals possible        *
     * evidence of criminal activity, system personnel may provide    *
     * the evidence from such monitoring to law enforcement officials.*
     ******************************************************************
Last login: Thu Oct  7 11:09:50 2021 from 1.1.1.201
[root@hk-tb ~]#

 

 

4.  motd 파일 내용 추가

ssh 원격 접속 및 로그인이 완료된 후 출력되는 배너를 설정하기 위해 motd 파일 내용을 추가합니다.

[root@hk-tb ~]#vi /etc/motd



###############################################################
#                                                             #
#                                                             #
#     Welcome To KVM Host for HK Jeon.!                       #
#                                                             #
#                                                             #
###############################################################

 

 

5.  재 접속을 통해 적용확인

재 로그인을 통해 설정 한 두 개의 모든 배너가 정상적으로 적용되었는지 확인합니다.

 

hkjeon@MacBook-Pro ~ % kvm
     ******************************************************************
     * This system is for the use of authorized users only. Usage of  *
     * this system may be monitored and recorded by system personnel. *
     * Anyone using this system expressly consents to such monitoring *
     * and is advised that if such monitoring reveals possible        *
     * evidence of criminal activity, system personnel may provide    *
     * the evidence from such monitoring to law enforcement officials.*
     ******************************************************************



###############################################################
#							   								  #
#							       							  #
#     Welcome To KVM Host for HK Jeon.! 		              #
#							      						      #
#							      							  #
###############################################################
Last login: Thu Oct  7 11:16:00 2021 from 1.1.1.201
[root@hk-tb ~]#

 

 

 

728x90
반응형

'Linux' 카테고리의 다른 글

[RHEL/CentOS 8] KVM install 설치방법  (0) 2021.10.07
[RHEL/CentOS 8] neofetch 설치  (0) 2021.10.07
[RHEL/CentOS 8] HAProxy를 통한 IPv6 LB 구성방법  (0) 2021.09.15
[CentOS7] foreman 설치 가이드 (v2.5.2)  (0) 2021.08.20
[Linux] vi 또는 vim으로 붙여넣기할 때 주석코드 붙은 이후에 자동으로 주석 될때  (0) 2021.08.12
'Linux' 카테고리의 다른 글
  • [RHEL/CentOS 8] KVM install 설치방법
  • [RHEL/CentOS 8] neofetch 설치
  • [RHEL/CentOS 8] HAProxy를 통한 IPv6 LB 구성방법
  • [CentOS7] foreman 설치 가이드 (v2.5.2)
레시피 마스터
레시피 마스터
클라우드 환경에서 OS, 자동화, 컴퓨팅등 알고 있는 지식으로 공유하는데 활용
  • 레시피 마스터
    클라우드 구축 레시피
    레시피 마스터
  • 전체
    오늘
    어제
    • 분류 전체보기 (66) N
      • Linux (21)
      • Virtualization (2)
      • OpenStack (2)
      • Container (14)
      • Monitoring (2)
      • Infra as Code (IaC) (1)
      • 서버_OS (9) N
      • 가상화 (1)
      • 클라우드 컴퓨팅 (4) N
      • 컨테이너 플랫폼 (3) N
      • 자동화 (1)
      • 데이터베이스 (2)
      • 모니터링 (4) N
  • 블로그 메뉴

    • 홈
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    yum #dnf #yumdownloader #rpm다운로드 #dnfdownload #yum-utils #리눅스패키지관리 #오프라인설치 #의존성다운로드 #리눅스팁
    리눅스 패스워드 복잡성
    systemd #journalctl #journald #리눅스로그 #로그관리 #journal사용법 #리눅스서버운영 #로그최적화 #systemd로그 #linux
    zabbix 에이전트 설정
    rhel7 #rhel8 #rhel9 #reposync #createrepo #오프라인리포지터리 #yum저장소 #dnf저장소 #리눅스패키지관리 #내부망패키지
    모니터링 에이전트
    pam #비밀번호우회 #복잡성우회 #리눅스보안 #시스템관리
    rhel7 #rhel8 #virt-customize #qcow2 #libguestfs #cloud-init #이미지작업 #kvm #리눅스가상화 #xfs호환성 #qcow2비밀번호설정
    rhel
    grafana #grafana시간대 #timezone설정 #서버모니터링 #asiaseoul #utc오류해결 #리눅스시간설정 #grafana설정
    리눅스 password 복잡성
    kvm #cloudimage #qcow2 #virt-install #리눅스가상화 #rhel #centos #cloudinit #vm자동화 #xfs_growfs #growpar
    cephdashboard #ceph관리 #ceph설정 #ceph사용자계정 #cephdashboard활성화 #ceph모니터링 #ceph웹인터페이스
    grafana #zabbix #서버모니터링 #방화벽설정 #centos #rhel #시각화대시보드 #grafana설치 #zabbix플러그인
    ceph #ceph모니터링 #ceph명령어 #rados #오픈소스스토리지 #클러스터상태 #osd #pg #radosdf #cephfs #cephadm #실무명령어
  • 최근 댓글

  • 최근 글

  • 반응형
  • hELLO· Designed By정상우.v4.10.3
레시피 마스터
[RHEL/CentOS 8] Banner 문구 및 설정방법
상단으로

티스토리툴바