An open API service indexing awesome lists of open source software.

https://github.com/github0null/ssh_guard

ssh 防爆破,自动将 ip 加入黑名单
https://github.com/github0null/ssh_guard

guard sshd

Last synced: 11 months ago
JSON representation

ssh 防爆破,自动将 ip 加入黑名单

Awesome Lists containing this project

README

          

## 简述

运行该脚本,会检查 ssh 的登陆失败记录,将超过尝试次数(默认3)的 ip 加入到黑名单 `/etc/hosts.deny`

***

## 安装

1. 安装 Python3

2. 将 src/main.py 复制到你的服务器中某个目录中

3. 使用命令编辑定时任务 `vim /etc/crontab`,添加如下任务:

```ini
# 每隔 2 min 运行一次 ssh_guard
*/2 * * * * root python3 //main.py >> //sshd_guard.log 2>&1
```