Korban: Install PAM Tally untuk mencatat kegagalan ke faillog

From OnnoWiki
Jump to navigation Jump to search

sumber: https://notblog.org/log-failed-login-attempts/

Step 1

Edit

vi /etc/pam.d/common-auth

Masukan di paling atas

# Log failed logins to /var/log/faillog
auth required pam_tally.so per_user magic_root onerr=fail

Step 2

Edit

vi /etc/pam.d/sshd

Masukan sebelum @include common-auth:

# Log failed login attempts to /var/log/faillog
auth required pam_tally.so per_user onerr=fail


Step 3

Edit

vi /etc/ssh/sshd_config

Pastikan

UsePAM yes


Step 4

Restart SSH

sudo service ssh restart


Referensi