Skip to content

Instantly share code, notes, and snippets.

@srhopkins
Last active August 29, 2015 14:22
Show Gist options
  • Save srhopkins/d52524ad43b81b6fed1b to your computer and use it in GitHub Desktop.
Save srhopkins/d52524ad43b81b6fed1b to your computer and use it in GitHub Desktop.
Remote wireshark
# /etc/sudoers on target may require "Defaults:username !requiretty" e.g. RHEL/CentOS <= 5
#set -x
[ -n "${2}" ] && TCPDUMP_FILTER="${2}" || TCPDUMP_FILTER="not port 22"
ssh ${1} sudo /usr/sbin/tcpdump -U -s0 -w - "${TCPDUMP_FILTER}" \
| wireshark -k -i -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment