I connect to linux server through ssh like:
ssh [email protected]
filled password,then I run a long-running program such as:
java -jar abc.jar -Dserver.port=80
but when I close the ssh connection on my computer,the program running on linux server is closed too.How can I keep the program running after close the ssh connection?
Try using nohup. Prefixing your command with nohup prevents the command from being aborted if you log out or exit the shell.
This seems to be the simplest method to achieve this.