linux加固方案

禁止root用户登录ssh

/etc/ssh/sshd_config

PermitRootLogin no

protocol   2

PAM认证模块禁止wheel组之外的用户su为root

/etc/pam.d/su

auth            sufficient      pam_rootok.so

auth            required        pam_wheel.so use_uid

usermod -G wheel username

groupadd wheel

禁止使用秘钥登录

/etc/ssh/sshd_config

RSAAuthentication no
PubkeyAuthentication no

禁止root用户登录ftp

预防Flood攻击

 /etc/sysctl.conf

net.ipv4.tcp_syncookies = 1

sysctl  -p

Author: bkdwei