The Arduino sketch should keep running once you upload it. When the Arduino sketch is uploaded, it starts running immediately and it doesn't stop unless there is an external command that makes it stop. You can do a quick test by uploading the blink sketch from the example codes in the Arduino IDE. You will see how the onboard LED starts blinking regardless if there is a PuTTY session open or not.
I have been SSHing Arduino sketches over putty to my Edison.
Where did you put the sketch? How do you run it? If you put it as /sketch/sketch.elf (as far as I recall) clloader should take care of running it independent on your ssh session.
If you try to run it as a standard Linux process you would need to start it with "nohup" for instance
Adding nohup worked. Thank you.