我的服务器受到攻击。我正在记录这种尝试:
Sep 22 06:39:11 s1574**** sshd[16453]: Failed password for invalid user amber from 64.215.17.4 port 35182 ssh2
Sep 22 04:39:11 s1574**** sshd[16454]: Received disconnect from 64.215.17.4: 11: Bye Bye
Sep 22 06:39:11 s1574**** sshd[16457]: Invalid user amber from 64.215.17.4
Sep 22 04:39:11 s1574**** sshd[16458]: input_userauth_request: invalid user amber
Sep 22 06:39:11 s1574**** sshd[16457]: pam_unix(sshd:auth): check pass; user unknown
Sep 22 06:39:11 s1574**** sshd[16457]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=dns2.rsd.com
Sep 22 06:39:11 s1574**** sshd[16457]: pam_succeed_if(sshd:auth): error retrieving information about user amber
Sep 22 06:39:14 s1574**** sshd[16457]: Failed password for invalid user amber from 64.215.17.4 port 35842 ssh2
Sep 22 04:39:14 s1574**** sshd[16458]: Received disconnect from 64.215.17.4: 11: Bye Bye
我该怎么做才能阻止这种访问尝试,例如在超过3个denie时阻止ip