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

Linux / UNIX set the DNS from the command line

Check this link for more information...

Linux nginx: Chroot (Jail) Setup

You can use traditional chroot kind of setup with nginx. Our sample setup: Jail Directory :...

iptables: Unknown error 18446744073709551615

When trying to run an OpenVPN Server and you receive the following error: iptables: Unknown...

SUSE Linux Restart / Stop / Start Network Service

Task: Start Network Service # /etc/init.d/network start # /etc/init.d/network start eth0 Task:...

nginx: Send Custom HTTP Headers

How do I send or set arbitrary HTTP headers using nginx web server? You need to use add_header...