#!/bin/sh

nic=eth0

ssh root@raspberrypi.local ifconfig $nic promisc

pipe_a="ssh root@raspberrypi.local /usr/sbin/tcpdump -U -i $nic not port 22 -w -"

pipe_b="wireshark -i - -k"

echo "executing:"
echo "$pipe_a | $pipe_b"
echo "Press Ctrl+C to exit ..."

$pipe_a | $pipe_b