首页 > 解决方案 > blackbox exporter ssh 连接测试问题

问题描述

伙计们:

我正在使用 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 配置的情况下解决此问题。

谢谢

标签: prometheussshdprometheus-node-exporterprometheus-blackbox-exporter

解决方案


这对我有用:

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

这已经让 sshd 高兴了。


推荐阅读