Re: Executing a file remotely

From: Ben Finney (bignose-hates-spam_at_and-benfinney-does-too.id.au)
Date: 02/12/04


Date: 12 Feb 2004 10:06:38 +1050

On 11 Feb 2004 15:20:41 -0800, Hank wrote:
> I was wondering how I would execute a file remotely?

That depends on how you'd execute any command on a remote machine. On
Unix systems, the preferred way these days is to use ssh:

    bignose@desktop$ ssh bignose@remoteserver 'command -with -args'

Assuming the 'ssh' command is available on the local machine, you could
execute the above command within the Python script using os.system():

    <http://www.python.org/doc/1.5.2p2/lib/os-process.html>

-- 
 \        "I washed a sock. Then I put it in the dryer. When I took it |
  `\                              out, it was gone."  -- Steven Wright |
_o__)                                                                  |
Ben Finney <http://bignose.squidly.org/>


Relevant Pages