Execute script on remote computer

Evan Klitzke evan at yelp.com
Wed Jun 20 06:51:21 CEST 2007

On 6/19/07, Vikas Saini <vsaini at cybage.com> wrote:
> I am trying to run the agent on one machine that will execute the script of
> a remote machine.

It's not clear what OS you're using. But if you're running a
Unix/Linux system and it's a relatively simple script that you want to
run, you should just use the ssh command coupled with the name of the
command you want to run (you don't even need the agent to use python,
necessarily). For example,

ssh user at foo bar

Will ssh to machine 'foo' as user 'user' and execute command 'bar' on
that machine (rather than launching a shell, which is what ssh will do
if no command is specified). When the command exits, ssh will exit as

Evan Klitzke <evan at yelp.com>

More information about the Python-list mailing list