AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 124668
Accepted
wallyk
wallyk
Asked: 2010-03-21 23:05:23 +0800 CST2010-03-21 23:05:23 +0800 CST 2010-03-21 23:05:23 +0800 CST

linux 安全日志 (/var/log/secure) 中的重复密码失败

  • 772

最近,我通过我的防火墙打开了 SSH 端口(并重定向到我的服务器),这样我就可以在路上检查(http)服务器。前一两周没有什么不同。但是现在,三四个星期后,我看到了很多这样的:

Mar 20 08:38:28 localhost sshd[21895]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=mail.queued.net  user=root
Mar 20 08:38:31 localhost sshd[21895]: Failed password for root from 207.210.101.209 port 2854 ssh2
Mar 20 15:38:31 localhost sshd[21896]: Received disconnect from 207.210.101.209: 11: Bye Bye
Mar 20 08:38:32 localhost unix_chkpwd[21900]: password check failed for user (root)
Mar 20 08:38:32 localhost sshd[21898]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=mail.queued.net  user=root
Mar 20 08:38:34 localhost sshd[21898]: Failed password for root from 207.210.101.209 port 3729 ssh2
Mar 20 15:38:35 localhost sshd[21899]: Received disconnect from 207.210.101.209: 11: Bye Bye
Mar 20 08:38:36 localhost unix_chkpwd[21903]: password check failed for user (root)
Mar 20 08:38:36 localhost sshd[21901]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=mail.queued.net  user=root
Mar 20 08:38:38 localhost sshd[21901]: Failed password for root from 207.210.101.209 port 4313 ssh2
Mar 20 15:38:38 localhost sshd[21902]: Received disconnect from 207.210.101.209: 11: Bye Bye
Mar 20 08:38:40 localhost unix_chkpwd[21906]: password check failed for user (root)
Mar 20 08:38:40 localhost sshd[21904]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=mail.queued.net  user=root
Mar 20 08:38:42 localhost sshd[21904]: Failed password for root from 207.210.101.209 port 4869 ssh2
Mar 20 15:38:43 localhost sshd[21905]: Received disconnect from 207.210.101.209: 11: Bye Bye
Mar 20 08:38:44 localhost unix_chkpwd[21909]: password check failed for user (root)
Mar 20 08:38:44 localhost sshd[21907]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=mail.queued.net  user=root
Mar 20 08:38:46 localhost sshd[21907]: Failed password for root from 207.210.101.209 port 2512 ssh2
Mar 20 15:38:47 localhost sshd[21908]: Received disconnect from 207.210.101.209: 11: Bye Bye
Mar 20 15:38:57 localhost sshd[21912]: Connection closed by 207.210.101.209

3 月 20 日大约有 1100 行,19 日为零,18 日大约有 800 行——所有这些都与同一个 IP 相关。

这是什么意思?我应该怎么办?为什么不按时间顺序?

logging redhat security
  • 3 3 个回答
  • 7094 Views

3 个回答

  • Voted
  1. Best Answer
    anonymouse
    2010-03-21T23:17:50+08:002010-03-21T23:17:50+08:00

    这些是脚本小子尝试通过 ssh 在您的机器上获取 root 权限。我发现处理这些问题的最佳方法是:

    1. 将 ssh 端口更改为 22(比如 32999)或其他随机高端口号以外的任何值
    2. 使用 fail2ban 或类似的脚本。在几次失败的登录尝试后,它会在特定时间段内禁止使用 iptables 的 ip。

    将有新手插话如何将端口设置为不同的数字是通过默默无闻的安全性。是和不是。它不会使您的盒子更安全,但会大大减少脚本破解 ssh 的次数。

    编辑:

    其他值得做的事情是,禁用 root 登录以防万一他们猜到了您的 root 密码,或者完全禁用密码身份验证并使用基于密钥的身份验证。

    • 4
  2. Dennis Williamson
    2010-03-21T23:31:06+08:002010-03-21T23:31:06+08:00

    可以使用一种称为端口敲击的技术,该技术允许您保持 ssh 端口关闭,直到您(外部)请求。

    • 2
  3. Jonathan Clarke
    2010-03-22T06:37:46+08:002010-03-22T06:37:46+08:00

    上面的答案解释了为什么您对 SSH 服务器进行了多次身份验证尝试。

    至于“为什么不是按时间顺序排列?”,看来您的时区设置可能有问题。所有日志似乎都是连续的,只是在不同的时间(分钟和秒排列)。

    尝试运行:

    sudo dpkg-重新配置 tzdata

    • 1

相关问题

  • IIS 6 - 仅记录某些目录

  • 什么是好的日志查看器,例如 apache、postfix、syslog?

  • 如何提供可搜索的 IRC 日志?

  • 避免将某些丢失的文件记录到 Apache2 错误日志中

  • Tomcat 6 HTTP 日志滚动和清除

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve