Limetime's TimeLine
article thumbnail
반응형

1. 로그인 완료 시 나오는 리눅스 버전 없애기

버전이 뜬다.

뭔가 보안상 없애고 싶다.

 

# cd /etc/update-motd.d  // ssh 로그인 완료할 때 나오는 리눅스 버전 관련 디렉터리

# tar cvfp backup.tar *     // 압축해서 백업하기(퍼미션도 그대로 유지)

# mkdir backup

# mv backup.tar backup

# chmod –x /etc/update-motd.d/*            // 실행권한 제거

# chmod +x /etc/update-motd.d/backup    // 백업 디렉터리에 실행권한 주기

# service sshd restart      // 이제 리눅스 버전 안나옴

 

2. 로그인 시 나오는 반겨주는 메시지!

Message Of The Day~

Welcome to Limetime's with Lock&Lock Server!

 

# vi /etc/motd

  -------------------------------------------------------------

| Welcome to Limetime's with Lock&Lock Server! |

 -------------------------------------------------------------

# vi /etc/ssh/sshd_config

 PrintMotd no   #주석 해제. 기본값이 yes로 되어 있음 (두 번 출력됨)

 #PrintLastLog yes   # 'Last login: Sun Nov 29 14: 18: 22 2020 from' 과 같은 마지막 접속 로그 출력

# service sshd restart

반응형
profile

Limetime's TimeLine

@Limetime

포스팅이 좋았다면 "공감❤️" 또는 "구독👍🏻" 해주세요!