Home > other >  Running a python script on a ubuntu server and connect to server and interact with script
Running a python script on a ubuntu server and connect to server and interact with script

Time:02-21

I am not sure how to approach this project but my goal is to have a python script constantly running on a ubuntu server in the cloud then being able to connect to my server via ssh and then being able to interact with the python script that is running but i am not sure where to start.

CodePudding user response:

use screen or tmux after establishing ssh connection.

Install tmux (it is usually installed by default) just in case:

sudo apt install tmux` them run `tmux

Inside the tmux session, you can run the script and interact with it. Whenever you got disconnected; the script will continue working.

After re-establishing ssh connection you can do tmux at and continue working with your script and check its log. For more information on tmux check out this link.

  • Related