【问题标题】:blackbox exporter ssh connection test problemblackbox exporter ssh 连接测试问题
【发布时间】:2019-11-12 07:47:43
【问题描述】:

各位:

我正在使用 blackbox exporter 来测试许多远程服务器的 ssh 端口 22,模块是 ssh_banner。问题是它总是为每个 ssh 测试打印一个远程服务器的日志。:

Oct 20 10:23:14 hpit32 sshd[14073]: Did not receive identification string from ******
Oct 20 10:23:16 hpit32 sshd[14074]: Did not receive identification string from ******

有谁知道如何在不更改 sshd 日志级别或任何 sshd 配置的情况下解决此问题。

谢谢

【问题讨论】:

  • AFAIK 无法绕过日志。这可能导致 fail2ban 或 sshguard 出现问题;确保 IP 在您的安全系统的例外列表中,并使用合理的抓取间隔。

标签: prometheus sshd prometheus-node-exporter prometheus-blackbox-exporter


【解决方案1】:

这对我有用:

  ssh_banner:
    prober: tcp
    timeout: 5s
    tcp:
      query_response:
      - expect: "^SSH-2.0-"
      - send: "SSH-2.0-blackbox-ssh-check"

这已经让 sshd 高兴了。

【讨论】:

    猜你喜欢
    • 2022-10-25
    • 2019-01-31
    • 2013-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-23
    • 2021-04-26
    相关资源
    最近更新 更多