Reputation: 51
I have this python script that I'm trying to run on a remote host. However, the script requires two arguments. For example, python script.py --port 4000 --service status
Now when I run the script locally on the machine it works fine. How can I run this same script on a remote linux machine. I've tried ssh user@remotehost python script.py --port 4000 --service status This doesn't work. The arguments are not passed in.
Thank you
Upvotes: 1
Views: 1772
Reputation: 90889
You should use the following -
ssh user@remotehost "python script.py --port 4000 --service status"
Please notice the "
double quotes, it has to be double quotes.
Upvotes: 2