SSH如何防破解
时间:2010-09-10 来源:bingqihan
# tar -zxvf DenyHosts-2.6.tar.gz |
DenyHosts参数配置
# cd /usr/share/denyhosts/ # DenyHosts默认安装目录 |
DenyHosts启动文件配置
# cp daemon-control-dist daemon-control # ./daemon-control #DenyHosts命令格式 Usage: ./daemon-control {start [args...] | stop | restart [args...] | status | debug | condrestart [args...] } For a list of valid args refer to: $ denyhosts.py --help # ./daemon-control start #启动DenyHosts starting DenyHosts: /usr/bin/env python /usr/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg |
如果要使DenyHosts每次重起后自动启动还需做如下设置:
# ln -s /usr/share/denyhosts/daemon-control /etc/init.d/denyhosts
# chkconfig –level 2345 denyhosts on |
或者修改/etc/rc.local文件:
# vi /etc/rc.local 加入下面这条命令 /usr/share/denyhosts/daemon-control start |