谁在敲我(SSH)的门?
Who Is That Knocking at My (SSH) Door?

原始链接: https://sheep.horse/2026/4/who_is_that_knocking_at_my_%28ssh%29_door.html

该实验追踪了一台安全配置服务器上的SSH登录尝试——一台配置了防火墙并*强制*使用密钥认证(不允许密码)的服务器。尽管如此,该服务器在一周内面临近500次的登录尝试,通过Fail2ban的积极IP封锁得以缓解。 尝试的用户名显示出常见模式:“sheep”(可能针对子域名),标准默认值如“admin”、“user”和“test”,以及基于服务器操作系统(“ubuntu”)的猜测。值得注意的是,攻击还针对流行的软件包,如“postgres”、“jenkins”和“mysql”,表明在搜索配置不当的安装。甚至尝试了个人姓名。 结论?应尽可能禁用密码认证。即使对于临时服务,强而独特的密码也至关重要,并且像Fail2ban这样的工具对于主动阻止可疑活动并保护您的服务器免受持续的自动化攻击至关重要。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 谁在敲我(SSH)的门? (sheep.horse) 14 分,by speckx 1 小时前 | 隐藏 | 过去的 | 收藏 | 讨论 帮助 考虑申请YC 2026年夏季项目!申请截止至5月4日 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

Note: As I was writing this I became aware of an even better project covering much the same ground in a more detailed way - I Left Port 22 Open on the Internet for 54 Days by Arman Hossain is much more informative.

The server that runs this website is locked down pretty tightly. No extra services running, all ports firewalled except those absolutely required, and (perhaps most importantly) SSH is configured to disable password authentication. It is impossible for users to log on without the private key but that doesn't stop the script kiddies from trying.

A visual representation of sshd protecting port 22 from bots and viruses
A visual representation of sshd protecting port 22 from bots and viruses

Every server on the internet is constantly under attack by bots trying common username/passwords to gain access for nefarious ends. I got curious about what usernames the hackers were trying to use. After all, they wouldn't try them if they didn't occasionally work.

In the last 7 days there have been almost 500 attempts to log in - this would be many, many times higher but I aggressively fail2ban any IP address that fails more than a couple of times. Currently my fail2ban blocklist contains over 100 addresses.

Here are some of the notable usernames tried:

sheep (169 attempts) - this is actually somewhat clever, I assume that the script takes the first subdomain of whatever server it is trying to hit. It doesn't work with sheep.horse but wouldn't be a terrible place to start on app.example.com.

admin (52 attempts), user (20 attempts), test (7 attempts), guest (2) - the old standbys. I assume root would be even higher but I disable the root user entirely on my server so it doesn't show up on this list.

ubuntu (30 attempts) - I am actually running Ubuntu which they can probably see from the http headers so this isn't a terrible guess.

frappe (7), postgres (7), odoo (4), oracle (4), jenkins (2), apache (2), mysql (1) - these are all attacks on well-known enterprise software packages. Not a bad list if you are looking for badly installed software with weak passwords since people often quickly stand up such services for testing without much thought.

pi (2), orangepi (1) - there are probably a bunch of poorly configured raspberry Pi's making for easy, if low-powered pickings. It just goes to show that there is no minimum reward below which people will not bother to be dicks on the internet.

stephen, nina, lee, vincent, rico (1 each) - Damn it, guys. I've told you your passwords are too easy to guess, now you are all on some hacker list.

The moral of the story is to turn off password authentication if you can, always use a strong password even on test or throwaway services, and don't be shy about banning based on suspicious SSH authentication attempts using fail2ban or something similar.

联系我们 contact @ memedata.com