Skip to main content
Mod Moved Comments To Chat
Minor formatting, remove duplicate tags
Source Link
AdminBee
  • 23.6k
  • 25
  • 56
  • 77

executing Executing local script on remote server with local input

I have a python script and input datainput data that the python script takes. I

I want to execute the python script on remote server without copying python script and data to the remote server without copying python script and data to the remote server.

I tried the script:

ssh [email protected] "cd /home/dong/fold python -u -" <  script.py arg1

It execute the script but the arg1arg1 (which is input data) python script doesn't take from local machine but when the input data present in remote server it works.

I hope experts may show some way to overcoming this problem.

executing local script on remote server with local input

I have a python script and input data that the python script takes. I want to execute the python script on remote server without copying python script and data to the remote server.

I tried the script:

ssh [email protected] "cd /home/dong/fold python -u -" <  script.py arg1

It execute the script but the arg1(which is input data) python script doesn't take from local machine but when the input data present in remote server it works.

I hope experts may show some way to overcoming this problem.

Executing local script on remote server with local input

I have a python script and input data that the python script takes.

I want to execute the python script on remote server without copying python script and data to the remote server.

I tried the script:

ssh [email protected] "cd /home/dong/fold python -u -" <  script.py arg1

It execute the script but the arg1 (which is input data) python script doesn't take from local machine but when the input data present in remote server it works.

I hope experts may show some way to overcoming this problem.

Source Link
simond
  • 149
  • 1
  • 3

executing local script on remote server with local input

I have a python script and input data that the python script takes. I want to execute the python script on remote server without copying python script and data to the remote server.

I tried the script:

ssh [email protected] "cd /home/dong/fold python -u -" <  script.py arg1

It execute the script but the arg1(which is input data) python script doesn't take from local machine but when the input data present in remote server it works.

I hope experts may show some way to overcoming this problem.