SSHDUMP(1)
π sshdump(1) β remote packet capture through SSH, bestie π
Okay so real talk: this is <pink>sshdump</pink>, and it's giving βlet me grab packets from a whole other machine through SSHβ energy. No cap. β¨
πΈ NAME πΈ
sshdump β provide interfaces to capture packets from a remote host through SSH using a remote capture binary. π
π¦ SYNOPSIS π¦
sshdump [ --help ] [ --version ] [ --extcap-interfaces ]
[ --extcap-dlts ] [ --extcap-interface=<interface> ] [ --extcap-config ]
[ --extcap-capture-filter=<capture filter> ] [ --capture ]
[ --fifo=<path to file or pipe> ] [ --remote-host=<IP address> ]
[ --remote-port=<TCP port> ] [ --remote-username=<username> ]
[ --remote-password=<password> ] [ --sshkey=<private key path> ]
[ --sshkey-passphrase=<private key passphrase> ]
[ --proxycommand=<SSH proxy command> ]
[ --remote-interface=<interface> ]
[ --remote-capture-command-select=<capture command selection> ]
[ --remote-capture-command=<capture command> ]
[ --remote-priv=<privilege elevation command selection> ]
[ --remote-priv-user=<privileged user name> ] [ --remote-noprom ]
[ --remote-filter=<remote capture filter> ] [ --remote-count=<number> ]
sshdump --extcap-interfaces
sshdump --extcap-interface=<interface> --extcap-dlts
sshdump --extcap-interface=<interface> --extcap-config
sshdump --extcap-interface=<interface> --fifo=<path to file or pipe>
--capture --remote-host=myremotehost --remote-port=22
--remote-username=user --remote-interface=eth2
--remote-capture-command='tcpdump -U -i eth0 -w-'
π DESCRIPTION π
Sshdump is an extcap tool, which means it's the little helper that lets you run a remote capture tool over an SSH connection. The one big requirement? The capture executable on the remote side has to actually have the capabilities to capture from the interface you want. Periodt. π
The feature is functionally equivalent to running commands like these:
$ ssh remoteuser@remotehost -p 22222 'tcpdump -U -i IFACE -w -' > FILE &
$ wireshark FILE
$ ssh remoteuser@remotehost '/sbin/dumpcap -i IFACE -P -w - -f "not port 22"' > FILE &
$ wireshark FILE
$ ssh somehost dumpcap -P -w - -f udp | tshark -i -
Typically, bestie, sshdump is not invoked directly. Instead it can be configured through the Wireshark graphical user interface or its command line. This little number starts Wireshark and starts capturing from host remotehost:
$ wireshark '-oextcap.sshdump.remotehost:"remotehost"' -i sshdump -k
And if you want to explicitly control the remote capture command, you do this:
$ wireshark '-oextcap.sshdump.remotehost:"remotehost"' \
'-oextcap.sshdump.remotecapturecommand:"tcpdump -i eth0 -Uw- not port 22"' \
-i sshdump -k
Supported interfaces:
sshdump
β¨ OPTIONS β¨
--helpβ Print program arguments. Your βwhat are the vibesβ button. π«Ά--versionβ Print program version. Iconic little number check. π--extcap-interfacesβ List available interfaces. It's giving inventory day. π--extcap-interface=<interface>β Use specified interfaces. Pick your main character interface. π--extcap-dltsβ List DLTs of specified interface. The technical lore, iykyk. π¦--extcap-configβ List configuration options of specified interface. All the settings, served fresh. β¨--extcap-capture-filter=<capture filter>β The capture filter. It corresponds to the value provided via thetshark -foption, and the Capture Filter field next to the interfaces list in the Wireshark interface. π--captureβ Start capturing from specified interface and write raw packet data to the location specified by--fifo. It's literally go time. π₯--fifo=<path to file or pipe>β Save captured packet to file or send it through pipe. Choose your destiny. π--remote-host=<remote host>β The address of the remote host for capture. The βwhere we're stalking packetsβ address. πΈ--remote-port=<remote port>β The SSH port of the remote host. The door number, basically. πͺβ¨--remote-username=<username>β The username for SSH authentication. Say hi properly. π«Ά--remote-password=<password>β The password to use (if notssh-agentand pubkey are used). WARNING: the passwords are stored in plaintext and visible to all users on this system. It is recommended to use keyfiles with a SSH agent. Like, seriously, bestie β protect your secrets. ππ--sshkey=<SSH private key path>β The path to a private key for authentication. NOTE: OnlyOPENSSHkey/value pair format is supported. Don't come in with the wrong key format and expect slay. π--sshkey-passphrase=<SSH private key passphrase>β The passphrase for the private key for authentication. The secret little whisper for your key. π--proxycommand=<proxy command>β The command to use as proxy for the SSH connection. Middleman moment. π§--remote-interface=<remote interface>β The remote network interface to capture from. The specific vibe on the remote host. π--remote-capture-command-select=<capture command-selection>β The selection of the build-in support for remote capture commands. Eitherdumpcapfor a remote capture command usingdumpcap,tcpdumpfor a remote capture command usingtcpdump, orother, where the remote capture command is to be given with the--remote-capture-commandoption.
Note that selecting dumpcap allows for specifying multiple capture interfaces as a whitespace separated list, while tcpdump does not. π
--remote-capture-command=<capture command>β A custom remote capture command that produces the remote stream that is shown in Wireshark. The command must be able to produce a PCAP stream written to STDOUT. See below for more examples.
If using tcpdump, use the -w- option to ensure that packets are written to standard output (stdout). Include the -U option to write packets as soon as they are received.
When specified, this command will be used as is, options such as the capture filter (--extcap-capture-filter) will not be appended. So don't expect extra seasoning to get added automatically. π
--remote-priv=<privilege elevation command selection>β The command to use to achieve privilege elevation to capture on the remote host. Eithernone,sudoordoas. Pick your power-up. π--remote-priv-user=<privileged user name>β If a command is used to achieve privilege elevation to capture on the remote host this may require a user name. If needed use this option to give that user name. Name drop, but make it privileged. π--remote-filter=<capture filter>β The remote capture filter. It corresponds to the value provided via thetshark -foption, and the Capture Filter field next to the interfaces list in the Wireshark interface. πΈ--remote-count=<number>β The number of packets to capture. Set your limit, bestie. π’β¨
β¨ EXAMPLES β¨
Okay bestie, this is the part where we actually do stuff π β every example from the page is below, literally all of them, no skips.
To see program arguments:
sshdump --help
To see program version:
sshdump --version
To see interfaces:
sshdump --extcap-interfaces
Only one interface (sshdump) is supported β that's the whole lineup, no cap π
Example output
interface {value=sshdump}{display=SSH remote capture}
To see interface DLTs:
sshdump --extcap-interface=sshdump --extcap-dlts
Example output
dlt {number=147}{name=sshdump}{display=Remote capture dependent DLT}
To see interface configuration options:
sshdump --extcap-interface=sshdump --extcap-config
Example output
arg {number=0}{call=--remote-host}{display=Remote SSH server address}{type=string}
{tooltip=The remote SSH host. It can be both an IP address or a hostname}{required=true}{group=Server}
arg {number=1}{call=--remote-port}{display=Remote SSH server port}{type=unsigned}{default=22}
{tooltip=The remote SSH host port (1-65535)}{range=1,65535}{group=Server}
arg {number=2}{call=--remote-username}{display=Remote SSH server username}{type=string}
{tooltip=The remote SSH username. If not provided, the current user will be used}{group=Authentication}
arg {number=3}{call=--remote-password}{display=Remote SSH server password}{type=password}
{tooltip=The SSH password, used when other methods (SSH agent or key files) are unavailable.}{group=Authentication}
arg {number=4}{call=--sshkey}{display=Path to SSH private key}{type=fileselect}
{tooltip=The path on the local filesystem of the private SSH key (OpenSSH format)}{mustexist=true}{group=Authentication}
arg {number=5}{call=--sshkey-passphrase}{display=SSH key passphrase}{type=password}
{tooltip=Passphrase to unlock the SSH private key}{group=Authentication}
arg {number=6}{call=--proxycommand}{display=ProxyCommand}{type=string}
{tooltip=The command to use as proxy for the SSH connection}{group=Authentication}
arg {number=7}{call=--remote-interface}{display=Remote interface}{type=string}
{tooltip=The remote network interface used for capture}{group=Capture}
arg {number=8}{call=--remote-capture-command-select}{display=Remote capture command selection}{type=radio}
{tooltip=The remote capture command to build a command line for}{group=Capture}
value {arg=8}{value=dumpcap}{display=dumpcap}
value {arg=8}{value=tcpdump}{display=tcpdump}{default=true}
value {arg=8}{value=other}{display=Other:}
arg {number=9}{call=--remote-capture-command}{display=Remote capture command}{type=string}
{tooltip=The remote command used to capture}{group=Capture}
arg {number=10}{call=--remote-priv}{display=Gain capture privilege on the remote machine}{type=radio}
{tooltip=Optionally prepend the capture command with sudo or doas on the remote machine}{group=Capture}
value {arg=10}{value=none}{display=none}{default=true}
value {arg=10}{value=sudo}{display=sudo}
value {arg=10}{value=doas -n}{display=doas}
arg {number=11}{call=--remote-priv-user}{display=Privileged user name for sudo or doas}{type=string}
{tooltip=User name of privileged user to execute the capture command on the remote machine}{group=Capture}
arg {number=12}{call=--remote-noprom}{display=No promiscuous mode}{type=boolflag}
{tooltip=Don't use promiscuous mode on the remote machine}{group=Capture}
arg {number=13}{call=--remote-filter}{display=Remote capture filter}{type=string}
{tooltip=The remote capture filter}{default=not ((host myhost) and port 22)}{group=Capture}
arg {number=14}{call=--remote-count}{display=Packets to capture}{type=unsigned}{default=0}
{tooltip=The number of remote packets to capture. (Default: inf)}{group=Capture}
arg {number=15}{call=--log-level}{display=Set the log level}{type=selector}
{tooltip=Set the log level}{required=false}{group=Debug}
value {arg=14}{value=message}{display=Message}{default=true}
value {arg=14}{value=info}{display=Info}
value {arg=14}{value=debug}{display=Debug}
value {arg=14}{value=noisy}{display=Noisy}
arg {number=16}{call=--log-file}{display=Use a file for logging}{type=fileselect}
{tooltip=Set a file where log messages are written}{required=false}{group=Debug}
To capture:
sshdump --extcap-interface=sshdump --fifo=/tmp/ssh.pcap --capture --remote-host 192.168.1.10
--remote-username user --remote-filter "not port 22"
To use different capture binaries:
sshdump --extcap-interface=sshdump --fifo=/tmp/ssh.pcap --capture --remote-host 192.168.1.10
--remote-username user --remote-priv sudo --remote-capture-command-select tcpdump
--remote-interface eth0 --remote-noprom
sshdump --extcap-interface=sshdump --fifo=/tmp/ssh.pcap --capture --remote-host 192.168.1.10
--remote-capture-command='dumpcap -i eth0 -P -w -'
sshdump --extcap-interface=sshdump --fifo=/tmp/ssh.pcap --capture --remote-host 192.168.1.10
--remote-capture-command='sudo tcpdump -i eth0 -U -w -'
π Note: To stop capturing CTRL+C/kill/terminate the application.
The sshdump binary can be renamed to support multiple instances. For instance if we want sshdump to show up twice in wireshark (for instance to handle multiple profiles), we can copy sshdump to sshdump-host1 and sshdump-host2. Each binary will show up an interface name same as the executable name. Those executables not being "sshdump" will show up as "custom version" in the interface description. β¨
π SEE ALSO π
Go give these a little look, bestie:
π NOTES π
Sshdump is part of the Wireshark distribution. The latest version of Wireshark can be found at https://www.wireshark.org. π
HTML versions of the Wireshark project man pages are available at https://www.wireshark.org/docs/man-pages. π¦
π«Ά AUTHORS π«Ά
Original Author
Dario Lombardo <lomato[AT]gmail.com>
π That's SSHDUMP(1), stamped 2026-10-08 β catch you in the group chat, bestie! π«Άβ¨
π¦ where this page comes from
- arch rolling: wireshark-cli 4.7.4-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms