CentOS8手动安装denyhosts

DenyHosts之前写过一篇:使用DenyHosts防止SSH暴力破解,接下来补一篇centos 8手动安装的方法,主要基于github上的安装介绍。

首先下载安装包:

$ wget https://github.com/denyhosts/denyhosts/releases/download/v3.1/DenyHosts-3.1.2.tar.gz
$ tar zxvf DenyHosts-3.1.2.tar.gz
$ mv DenyHosts-3.1.2 DenyHosts

使用root用户安装,机器只有python3环境:

# wget https://raw.githubusercontent.com/denyhosts/denyhosts/master/python3Conversion.sh
# wget https://raw.githubusercontent.com/denyhosts/denyhosts/master/requirements.txt
# sh python3Conversion.sh
# cd DenyHosts
# python setup.py install

配置启动服务:

# cp denyhosts.conf /etc
# vim /usr/local/bin/daemon-control-dist
# 修改这行配置:
DENYHOSTS_BIN   = "/usr/bin/denyhosts.py" -> DENYHOSTS_BIN   = "/usr/local/bin/denyhosts.py"
# cd /etc/init.d
# ln -s /usr/local/bin/daemon-control-dist denyhosts
# chkconfig --add denyhosts
# systemctl daemon-reload
# systemctl restart denyhosts.servic
# systemctl enable denyhosts.service
# systemctl status denyhosts.service
# echo "systemctl restart denyhosts.service" >> /etc/rc.d/rc.local


anzhihe安志合个人博客,版权所有丨 如未注明,均为原创 丨转载请注明转自:https://chegva.com/4042.html | ☆★★每天进步一点点,加油!★★☆

您可能还感兴趣的文章!

发表评论

电子邮件地址不会被公开。 必填项已用*标注