nohup or persistent process on Mac OS X ssh
One thing that always works is screen. http://ss64.com/osx/screen.html it seems to be available on Mac OS X per default.

Edit: http://web.archive.org/web/20130413070916/http://macdevcenter.com/pub/a/mac/2004/07/06/unix_gems.html another tutorial abut screen.

Additionally, here is some quick tips on how to use screen

Open a new 'screen' instance

$ screen


Once, in the screen, you can 'detach' (or close out of it) the screen like this:

ctrl+A and then press D


To resume a screen, you typically do this:

$ screen -x


If you have more than one screen instance, it will tell you their IDs, in which case you can choose which one to resume like this:

$ screen -r &lt;screen id&gt;