Just read a good guide on how to keep commands running when you exit ssh:
Disown, nohup : Bash Commands.
Basically:
nohup ./mycommand &
Adding the ampersand to the end of a command in Nix executes the command in the background and gives you back your shell. However, if you quit your terminal the process will be killed. The nohup command takes care of that.
What is nohup? It's another obfuscated Nix low level utility that is an abbreviation for "No Hangup Signal", in other words: if the terminal sends a hangup signal, normally that kills all running processes, but this says ignore that.
Wikipedia article on nohup