tcpdump: Monitor ALL eth1 Traffic Except My Own SSH Session

I'm using tcpdump to dump, debug and monitor traffic on a network. However, there is lots of noise and I would like to exclude ssh from my dumps. How do I monitor all traffic except my ssh session?


The tcpdump command displays out the headers of packets on a network interface that match the boolean expression. In other words you can use boolean expression to drop ssh traffic from dumping and monitoring operation using the following syntax:

tcpdump -i eth1  -s 1500 port not 22

You can skip additional ports too:

tcpdump -i eth1  -s 1500 port not 22 and port not 53

You can also use ip or hostname:

tcpdump -i eth1 port not 22 and host 1.2.3.4

See also:

man tcpdump

Was this answer helpful?

 Print this Article

Also Read

CentOS / Redhat: Install KVM Virtualization Software

Required Packages You must install the following packages: kmod-kvm : kvm kernel module(s)...

PHP Security: Limit Resources Used By Script

How do I control and put limits on php scripts such as maximum execution time of each script and...

Nginx Force (Redirect) WWW.Domain.COM To Domain.COM

I know how to force and redirect www.example.com to example.com under Lighttpd web server. How do...

CentOS/RHEL Linux: Remove GDM

How do I uninstall a GUI Gnome login system ( GDM ) from my CentOS Linux v5.5 based server? GDM...

HowTo: Update Centos Linux 5.4 to 5.5

Step # 1: Make A Backup It cannot be stressed enough how important it is to make a backup of...