7. 删减登录信息
默认情况下,登录提示信息包括Linux发行版、内核版本名和服务器主机名等。
对于一台安全性要求较高的机器来说这样泄漏了过多的信息。
可以编辑/etc/rc.d/rc.local将输出系统信息的如下行注释掉。
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot
# echo "" > /etc/issue
# echo "$R" >> /etc/issue
# echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
# cp -f /etc/issue /etc/issue.net
# echo >> /etc/issue
然后,进行如下操作:
# rm -f /etc/issue
# rm -f /etc/issue.net
# touch /etc/issue
# touch /etc/issue.net