I am new to this and need some advice on resolving my problem. I have a python script on a remote server. I want to execute that script from my local system and then transfer the result file generated on the remote server to my local system.
So, I would be grateful if someone can help me with a script or single command that can do this.
I tried a script but when I am in the remote server via SSH, the second line to execute the python script does not work. I also tried using nohup but still, it is not working
Below are the steps that need to be followed
- ssh
- python script.py
- Then 'exit' from ssh
- scp <output_file>