Putty will terminate your session once it finishes. I was successful in the past with Tmux instead. With Tmux you can connect to the session remotely and detach it so even when you logout the process is still running. If you are executing it from a Windows machine you will need an emulator such as cgwin