How can I keep a program on a VPS running after SSH session times out?
Asked
Active
Viewed 3,830 times
1
-
I think you have to run it like `nohup YOURCOMMAND`. Not 100% sure though, try it. – Byte Commander Jan 30 '17 at 10:46
2 Answers
3
screen or tmux
you can use screen or tmux to allow processes to run in the background, detach them from your session and later re-attach them.
I personally like them better than nohup because of the control you have through being able to re-attach those screen-/tmux-sessions later.
A nice wrapper around screen or tmux is byobu (which defaults to using tmux). You can install it by typing apt-get install byobu at a command line.
Phillip -Zyan K Lee- Stockmann
- 2,303
- 12
- 26
2
nohup
you can use nohup YOURCOMMAND to prevent the termination of your ssh connection to kill your command. (@byte-commander mentioned it in a comment earlier)
Phillip -Zyan K Lee- Stockmann
- 2,303
- 12
- 26