I'm using Mac OS X, which means I don't have (for example) pgrep/pkill, but I want something like that (I don't use macports/fink, either - homebrew is my Unix package tool of choice - so packages from those won't do).

I want to find and kill an instance of ssh with particular parameters - basically, a particular remote ssh port forwarding tunnel. The command I'd use is something like this:

ps aux | grep ssh | grep remote-host | grep port-forwarding-stmt

However, sometimes this grep command actually shows up in the output, so the current command string is not useful as written.