服务器安全 DenyHosts阻止SSH暴力破解

wget http://soft.vpser.net/security/denyhosts/DenyHosts-2.6.tar.gz

tar zxvf DenyHosts-2.6.tar.gz

cd DenyHosts-2.6

echo "" > /var/log/secure && service rsyslog restart

python setup.py install

cd /usr/share/denyhosts/

cp denyhosts.cfg-dist denyhosts.cfg

cp daemon-control-dist daemon-control

chown root daemon-control

chmod 700 daemon-control

./daemon-control start

echo "/usr/share/denyhosts/daemon-control start" >> /etc/rc.local

echo "222.214.54.69" >>  /usr/share/denyhosts/allowed-hosts 

DenyHosts/etc/init.d/denyhosts

這篇文章有幫助嗎? 0 Users Found This Useful (0 Votes)