Created
February 16, 2021 08:37
-
-
Save rileypeterson/043a611f9c0f7376158036811ad2b20f to your computer and use it in GitHub Desktop.
Execute remote scripts via ssh and tmux (detached). This is much more convenient than nohup, etc. and it lets you actually re-attach to session if you want to ssh in and check on it :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh [email protected] -t 'tmux new-session -d "sleep 20"' | |
# or change "sleep 20" --> "python my_time_consuming_python_script.py" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment