Execute remote python script via SSH

前端 未结 4 652
不知归路
不知归路 2021-01-31 05:14

I want to execute a Python script on several (15+) remote machine using SSH. After invoking the script/command I need to disconnect ssh session and keep the processes running in

4条回答
  •  情深已故
    2021-01-31 05:19

    You can even use tmux in this scenario.

    As per the tmux documentation:

    tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal. And do a lot more

    From a tmux session, you can run a script, quit the terminal, log in again and check back as it keeps the session until the server restart.

    How to configure tmux on a cloud server

提交回复
热议问题