I have a .sh file and related Python files associated with the script on my local machine, but I need to run it using screen because I need an ssh connection for a long period of time. So I need to ssh into a remote machine and continue to run the .sh script until it finishes. I've been looking throughout StackExchange for information on how to do this, but I'm confused on how to proceed.
Do I need to copy the files onto the remote machine to do this? If not, what is the command I would need to run using screen to accomplish this task? Thanks.
So far I've tried:
1) ssh name@server screen -d -m "./executable.sh" 2) ssh -t name@server "screen -RD && ./executable.sh"
Let me know if I'm doing something wrong here.