Maybe too late, but...

If you're running a command on a server you can use the screen utility or something like tmux to start the command. From there you can safely log off from the server and be assured that the session will continue to run.

This will start a new session:
> screen -r

When you're in the second session you can use the key combination 'control+a+control+d' to return to your actual ssh session. From there you should see a message that you've detached the screen. You can then type `screen -r` again to return to your session. Between logging on and off of the server the session should persist.