SSH connection - run program -> howto to keep program running when the ssh-connection is closed

前端 未结 3 1747
情话喂你
情话喂你 2021-01-15 23:33

In short: What is the most elegant solution to keep a perl/python/R/etc script/program running on a server (connected via ssh) when the remote server connec

3条回答
  •  耶瑟儿~
    2021-01-16 00:04

    In the hope that someone else might find this question and find this information useful, there is an application called "screen" out there that can also let you achieve this.

    Most distributions should have them in their repositories under the screen package name. If I wanted to make a screen, I would simply run screen -dmS screenName command and it would run the command in a different "screen", which can be accessed with screen -r screenName. You can detach from a screen at any time using CTRL+A+D.

    I hope someone can benefit from this information, as it is useful when you'd like to run a process but also be able to review its output assuming it has any (which many of my applications do).

提交回复
热议问题