日记 [2007年01月24日]服务器加强安全
生活随笔
收集整理的這篇文章主要介紹了
日记 [2007年01月24日]服务器加强安全
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
禁止root登陸ssh
vi?/etc/ssh/sshd_config PermitRootLogin no 禁止其他用戶su到root usermod -G wheel centospub ← 將一般用戶 centospub 加在管理員組wheel組中
vi /etc/pam.d/su ← 打開這個配置文件
#auth required /lib/security/$ISA/pam_wheel.so use_uid ← 找到此行,去掉行首的“#”
↓
auth required /lib/security/$ISA/pam_wheel.so use_uid ← 變為此狀態(大約在第6行的位置)
echo "SU_WHEEL_ONLY yes" >> /etc/login.defs ← 添加語句到行末
vi?/etc/ssh/sshd_config PermitRootLogin no 禁止其他用戶su到root usermod -G wheel centospub ← 將一般用戶 centospub 加在管理員組wheel組中
vi /etc/pam.d/su ← 打開這個配置文件
#auth required /lib/security/$ISA/pam_wheel.so use_uid ← 找到此行,去掉行首的“#”
↓
auth required /lib/security/$ISA/pam_wheel.so use_uid ← 變為此狀態(大約在第6行的位置)
echo "SU_WHEEL_ONLY yes" >> /etc/login.defs ← 添加語句到行末
轉載于:https://blog.51cto.com/coolerfeng/76503
總結
以上是生活随笔為你收集整理的日记 [2007年01月24日]服务器加强安全的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 那层纸不要轻易捅破
- 下一篇: MOTO行货如此服务——服务的南北差异