If you don't want to use sshfs you can also use something like this :
echo "tcpdump -i eth0 -U -s0 -w - \"not port 22\" 2> /dev/null | ssh -p 22 user@$host \"touch /path/to/file && cat - > /path/to/file\"" | at now
#Or execute the command direclty without the echo | at now
Wireshark SSH Tunnel
in LAN Turtle
Posted
You can use tcpdump du save data to a file and read it in real time in your distant server
Let's say that you have configured sshfs and it's working
Steps :
tcpdump -i eth0 -U -w /sshfs/pcapFile "port 80"
mkfifo /tmp/sharkfin wireshark -k -i /tmp/sharkfin & tail -f -n +1 /pathToSshfs/pcapFile > /tmp/sharkfin &
echo "tcpdump -i eth0 -U -s0 -w - \"not port 22\" 2> /dev/null | ssh -p 22 user@$host \"touch /path/to/file && cat - > /path/to/file\"" | at now #Or execute the command direclty without the echo | at now