引用:filter f_authpriv { facility(auth, authpriv); };
destination authlog { file("/var/log/auth.log"); };
log { source(src); filter(f_authpriv); destination(authlog); };
这样登录失败的尝试就可以被记录了。syslog-ng很好,有空还要好好学一下详细使用。
对于配置了iptables的用户,用sshguard的解决方案比较好,它自动的处理登录失败的尝试,并且在iptables拒绝尝试过多的IP,挺好的,不过他在gentoo上还是被hardened profile mask的。