简体   繁体   English

如何通过SSHFS在实时模式下使用Wireshark

[英]How to use Wireshark in live mode via SSHFS

I have a remote machine that I run experiments on. 我有一台运行实验的远程计算机。 On this machine, I want to sniff the packets sent and received. 在这台机器上,我想嗅探发送和接收的数据包。 On the machine in front of me, I want to open Wireshark and see the packets live. 在我前面的机器上,我想打开Wireshark并查看数据包是否处于活动状态。

The only way I have to access the remote machine is SSH. 我必须访问远程计算机的唯一方法是SSH。

What do I do? 我该怎么办?

  1. Establish an SSH-mount using SSHFS. 使用SSHFS建立SSH挂载。
  2. Make sure that stdbuf is available (using homebrew on OS X or Cygwin on Windows). 确保stdbuf可用(在OS X上使用自制软件或在Windows上使用Cygwin)。
  3. Start capturing on the remote machine using 使用开始在远程计算机上捕获

    stdbuf -o0 sudo ibdump -s -o - > sniffer.pcap stdbuf -o0 sudo ibdump -s -o-> sniffer.pcap

  4. Run Wireshark on the client 在客户端上运行Wireshark

    stdbuf -o0 tail -c +0 -F /sshfsmount/sniffer.pcap | stdbuf -o0尾部-c +0 -F /sshfsmount/sniffer.pcap | ./Wireshark.exe -k -i - ./Wireshark.exe -k -i-

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM