SSHD 보안 - fail2ban, port 변경
· 2 min read
실패한 로그인 IP 확인
$ cat /var/log/secure | grep 'sshd.*Failed' | grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | sort | uniq -c
## 실패 카운트와 IP
6 100.34.214.24
6 101.109.152.219
6 101.164.141.36
기본 포트를 사용 중이라면 어마어마한 IP 목록이 나올 것이다.