FreeBSD 6.1 入门级Web服务器配置手记
http://tech.ddvip.com 2007年04月13日 社区交流
本文详细介绍FreeBSD 6.1 入门级Web服务器配置手记
2、设置远程登录安全
# ee /etc/ssh/sshd_config
port 22 //可以改成不常用端口,并在防火墙设置中作相应修改
protocol 1
hostkey /etc/ssh/ssh_host_key
PermitRootLogin no
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeyFiles .ssh/authorized_keys
PasswordAuthentication no
# ssh-keygen -b 1024 -t rsa1一路回车默认
# cp /root/.ssh/identity.pub /usr/www # 复制到一个可以用ftp下载的地方用ftp下载identity.pub,保存到本地;
在本地启动putty.exe(免费软件);
在session设置中填好IP和端口;
在connection-SSH-Auth中,Browse下载的identity.pub;
勾选Attempt TIS or CryptoCard auth(SSH-1);
点击open连接;
按照提示输入用户名、密码
3、其他安全设置
关闭一些不安全的服务
# ee /etc/rc.conf
sendmail_enable="NONE"
nfs_server_enable="NO"
nfs_client_enable="NO"
portmap_enable="NO"
syslogd_enable="YES"
syslogd_flags="-ss"
icmp_drop_redirect="YES"
log_in_vain="YES"
inetd_enable=”NO” # 如果pure-ftpd以Inetd方式运行,需设置为YES禁止一般用户查看系统日志
# chmod g-w,o-r /var/log/*
# chmod 600 /etc/syslog.conf
# chmod 600 /etc/newsyslog.conf对bin和sbin进行安全保护
# chflags schg /bin/*
# chflags schg /sbin/*
责编:豆豆技术应用
正在加载评论...