Run a persistent process via ssh

后端 未结 5 479
北恋
北恋 2020-12-17 09:50

I\'m trying to start a test server via ssh but it always dies once i disconnect from ssh.

Is there a way to start a process (run the server) so it doesn\'t die upon

5条回答
  •  鱼传尺愫
    2020-12-17 10:39

    As an alternative to nohup, you could run your remote application inside a terminal multiplexor, such as GNU screen or tmux.

    Using these tools makes it easy to reconnect to a session from another host, which means that you can kick a long build or download off before you leave work and check on its status when you get home. For instance. I find this particularly useful when doing development work on servers that are very remote (in a different country) with unreliable connectivity between me and them, if the connection drops, I can simply reconnect and carry on without losing any state.

提交回复
热议问题