How to maintain command after exiting SSH?
Found out the issue was with cPanel, as it did not support node.js. I moved to DigitalOcean and it worked fantastically there.
Automatically close PuTTY when connection is lost
PuTTY is not intended for automation.
Use PLink (PuTTY command-line tool). It's a console application, with the same command line arguments as PuTTY, so the transition should be easy.
Though setting "Close window on exit" to "Always" does work (even if you claim it does not).
Does quitting putty close the running command
Assuming your goal is to have the rsync command continue to run, the simplest thing is to orphan the job. There are two ways to do this:
(rsync foo bar &)
The above will create the job detached from your terminal in the beginning, so closing the terminal will not stop it.
rsync foo bar & # or without &, then Ctrl-Z to stop, then "bg" to background
disown
The above will disown a running job, so you can close the terminal without stopping it.
Finally, you could use the program screen(1)
or similar to keep a terminal session alive and intact (and able to be resumed) even when you end your Putty session.
Getting ssh to execute a command in the background on target machine
I had this problem in a program I wrote a year ago -- turns out the answer is rather complicated. You'll need to use nohup as well as output redirection, as explained in the wikipedia artcle on nohup, copied here for your convenience.
Nohuping backgrounded jobs is for
example useful when logged in via SSH,
since backgrounded jobs can cause the
shell to hang on logout due to a race
condition [2]. This problem can also
be overcome by redirecting all three
I/O streams:nohup myprogram > foo.out 2> foo.err < /dev/null &
Related Topics
Ksh Storing Result of a Command to a Variable
Does Linux Support Memory Isolation for Processes
How to Get Only Filenames Without Path by Using Grep
Perl: What Does Checkstack.Pl in Linux Source Do
Best Approach to Detecting a Move or Rename to a File in Linux
How to Search for Invisible Control Characters
Curl: (2) Failed Initialization
Top Command First Iteration Always Returns the Same Result
How to Do a One Way Diff in Linux
Compile Linux Kernel (2.6) Module Including Non Kernel Headers
Find Command to Find Files and Concatenate Them
Jenkins to Run Maven Build on Linux or Windows
(Delphi Linux) Ld-Linux.Exe: Error: Cannot Find -Lgcc_S