0

I need to take random tcpdump samples from remote host. Starting tcpdump is not the problem but closing it on remote host is.

Code below works fine.

var child = spawn('ssh', [ 'a@'+b, 'tcpdump', '-w -', '-i any']);

child.kill()

tcpdump on remote gone.

This does not.

var child = spawn('ssh', [ 'a@'+b, 'tcpdump', '-w -', '-i any', 'port 9999']);

child.kill()

tcpdump on remains.

This seems to work random.

var child = spawn('ssh', [ 'a@'+b, 'tcpdump', '-w -', '-i any', 'portrange 9999-10010']);

child.kill()

Thanks.

BhushanK
  • 1,205
  • 6
  • 23
  • 39
J-Ape
  • 21
  • 2

0 Answers0