![SSH:启动任务并使其运行,即使我退出终端](https://linux22.com/image/127934/SSH%EF%BC%9A%E5%90%AF%E5%8A%A8%E4%BB%BB%E5%8A%A1%E5%B9%B6%E4%BD%BF%E5%85%B6%E8%BF%90%E8%A1%8C%EF%BC%8C%E5%8D%B3%E4%BD%BF%E6%88%91%E9%80%80%E5%87%BA%E7%BB%88%E7%AB%AF.png)
我想通过 ssh 启动任务然后退出我的终端并让我的任务在我的 ssh 服务器上继续。
我尝试过很多事情哪个不起作用, 例如 :
laptop$ ssh server@ipaddress
server$ mytask &
[1] 12345
server$ logout
或者
laptop$ ssh server@ipaddress
server$ mytask
(then hit [Ctrl]+[Z])
server$ logout
甚至
laptop$ ssh server@ipaddress -f "mytask"
(and then close my terminal)
但即使在我最后一次尝试中,关闭终端也会停止任务。
我应该如何进行?
提前致谢!!