ubuntu22.04安装denyhosts

git clone https://github.com/denyhosts/denyhosts.git
cd denyhosts
python setup.py install
cp denyhosts.conf /etc
cp daemon-control-dist /usr/share/denyhosts/daemon-control
cp denyhosts.py /usr/sbin/denyhosts.py
cd /etc/init.d
ln -s /usr/share/denyhosts/daemon-control denyhosts
编辑denyhosts
从第2行开始添加以下内容

### BEGIN INIT INFO
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO

systemctl enable denyhosts
systemctl start denyhosts

发表回复