Linux1-31.131.231.331.441.541.641.751.8SSHIP51.9root51.10suroot61.11Banner62-72.172.272.383.1383.283.394-94.14.294.394.4104.55105.1105.2115.3syslog115.4115.5125.6croncron/at6—126.1126.2136.3136.4IP147147.1FTP1410127.2157.3NFS157.4FTP151.1passwd<>rootpasswd<><>1.2vi/etc/security/userminlen=8//minlenminalpha+minotherminalpha+minother88minother8-minalphaminalpha=4//008minother=0//0081.3vi/etc/security/user/etc/security/userMinalpha4//008Minother4//0081.4/etc/security/userDictionlist=/usr/share/dict/words1.512/etc/security/userMaxage=121.655/etc/security/userLoginretries=51.78/etc/security/userhistsize=81.8SSHIProotvi/etc/ssh/sshd_config#cat/etc/ssh/sshd_configPermitRootLoginyes〃是否允许 root 登录。1.1PasswordAuthenticationyes〃密码是否有认证选 yes 有ChallengeResponseAuthenticationno〃攻击响应认证否GSSAPIAuthenticationyes〃通用安全服务应用程序接口认证是UsePAMno〃如果启用了 PAM,那么必须使用 root 才能运行 sshd。PermitRootLoginnosshservicesshdrestartsurootsurootsu1.11BannerbannerBanner/etc/security/login.cfgdefaultherald="ATTENTION:Youhaveloggedontoasecuredserver..Allaccesses2.1cat/etc/passwordcat/etc/shadowrootpasswdusernamepasswordsmituser2.2smitusersmitusersmituservi/etc/security/useraccount_locked=true2.3lsuser-arloginrootrootrlogin1rootrlogin#lsuser-arloginroot2root#chuserrlogin=falserootroot#chuserrlogin=trueroot3.11.2.3.netstatannetstatan3.29auditd3.31.IPhosts.allowhosts.denyIP#cathosts.allowSshd:210.13.218.*:allow//210ipshhd#cathosts.denySshd:all:deny//sshdhosts.allowhosts.denyhosts.allow4.1cat/etc/profile|grepTMOUTvi/etc/profileTMOUT=18034.2设置值umask077#rootumask022#root4.3/etc/profileHISTFILESIZEHISTSIZEHISTSIZE=80HISTFILESIZE=804.41.2.1.2.4.5dfhFilesystemsizeusedavailuse%mountedon55.1syslog/etc/syslog.conf(/var/adm/messages)(@hostname)startsrc-ssyslogdsyslogstopsrc-ssyslogdsyslog5.2/etc/security/failedloginWho/etc/security/failedlogin5.3 syslog