{"id":21744560,"url":"https://github.com/github0null/ssh_guard","last_synced_at":"2025-04-13T05:12:05.284Z","repository":{"id":100179879,"uuid":"335492236","full_name":"github0null/ssh_guard","owner":"github0null","description":"ssh 防爆破，自动将 ip 加入黑名单","archived":false,"fork":false,"pushed_at":"2022-10-24T07:09:14.000Z","size":25,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T22:04:09.165Z","etag":null,"topics":["guard","sshd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github0null.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-03T03:08:08.000Z","updated_at":"2024-02-18T13:49:04.000Z","dependencies_parsed_at":"2023-06-25T20:07:31.616Z","dependency_job_id":null,"html_url":"https://github.com/github0null/ssh_guard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fssh_guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fssh_guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fssh_guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fssh_guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github0null","download_url":"https://codeload.github.com/github0null/ssh_guard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665744,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["guard","sshd"],"created_at":"2024-11-26T07:11:55.934Z","updated_at":"2025-04-13T05:12:05.272Z","avatar_url":"https://github.com/github0null.png","language":"Python","readme":"## 简述\n\n运行该脚本，会检查 ssh 的登陆失败记录，将超过尝试次数（默认3）的 ip 加入到黑名单 `/etc/hosts.deny`\n\n***\n\n## 安装\n\n1. 安装 Python3\n\n2. 将 src/main.py 复制到你的服务器中某个目录中\n\n3. 使用命令编辑定时任务 `vim /etc/crontab`，添加如下任务:\n\n```ini\n# 每隔 2 min 运行一次 ssh_guard\n*/2 * * * * root python3 /\u003cYOUR_PATH\u003e/main.py \u003e\u003e /\u003cYOUR_LOG_PATH\u003e/sshd_guard.log 2\u003e\u00261\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0null%2Fssh_guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub0null%2Fssh_guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0null%2Fssh_guard/lists"}