반응형
개요
redhat 8 버전 부터는 tcp wrapper를 지원하지 않는 대신 openssh의 Match를 이용하여 특정 IP에 대해 ACL을 설정할수 있다.
1. sshd_config 파일 수정
예) 192.168.0.1 에 대해서만 접속을 허용하고 그외에는 모든 접속 차단
Match Address 192.168.0.1 MaxAuthTries 3 Match Address * MaxAuthTries 0 |
2. sshd 서비스 재시작
# systemctl restart sshd
3. 결과
$ ssh root@192.168.0.172 Received disconnect from 192.168.0.172 port 22:2: Too many authentication failures Disconnected from 192.168.0.172 port 22 $ |
반응형
'운영체제 > Unix & Linux' 카테고리의 다른 글
firewall-cmd 명령어 (0) | 2024.03.15 |
---|---|
iptables 명령어 (0) | 2024.03.13 |
[Solaris] /tmp 파일시스템 크기 조정 (0) | 2024.02.23 |
solaris 10 / 11 패키지 관리 명령어 (0) | 2023.11.27 |
expect script 예제 (0) | 2023.09.12 |