【问题标题】:How to capture MQTT data locally in SSH remote server using Wireshark?如何使用 Wireshark 在 SSH 远程服务器中本地捕获 MQTT 数据?
【发布时间】:2021-05-15 13:17:59
【问题描述】:

我想在家中使用 Wireshark 在基于 SSH Linux 的远程服务器上捕获 MQTT 数据包。我可以通过互联网捕获数据,例如当我使用这个命令行mosquitto_pub -h test.mosquitto.org -t topic -m "Hello"时,我可以在Wireshark中看到数据包。但是,当我在 localhost 中发布数据时,例如使用此命令 mosquitto_pub -d -h localhost -t hello/world -m "75" 我在 Wireshark 中看不到任何数据包。我想在同一个远程服务器上创建一个客户端/服务器。

我用这个命令打开Wireshark:

sudo ssh user@x.x.x.x tcpdump -U -s0 -w - | wireshark -k -i -

我只知道 Wireshark 的基本知识,请问我该如何解决?

【问题讨论】:

    标签: wireshark remote-server tcpdump


    【解决方案1】:

    您没有指定tcpdump 应该捕获的接口。尝试添加-i lo 选项,如下所示:

    sudo ssh user@x.x.x.x tcpdump -i lo -U -s0 -w - | wireshark -k -i -
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-10
      • 2020-10-29
      • 1970-01-01
      相关资源
      最近更新 更多