Re: Executing a file remotely

From: Cameron Laird (claird_at_lairds.com)
Date: 02/12/04


Date: Thu, 12 Feb 2004 00:29:42 -0000

In article <slrnc2lf46.16j.bignose-hates-spam@rose.localdomain.fake>,
Ben Finney <bignose-hates-spam@and-benfinney-does-too.id.au> wrote:
>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 believe soundwave56 is focused on Windows hosts. There, the
correct initial answer to, "how would I execute a file remotely?"
is, through a security breach.

That's a serious answer. Operating systems are not *supposed* to
allow "outsiders" to execute processes.

There are, of course, plenty of more-or-less legitimate reasons
you might need to execute remote processes. At a minimum (again,
assuming you don't exploit holes in Windows), you'll need to
configure the remote host ahead of time in one of several ways
which provide for remote process launching. Which of those
several ways should you choose? It depends. At this point, it
might help to understand your larger goals. Is this really about
file backup, or inventory management, or network administration,
or ...?

-- 
Cameron Laird <claird@phaseit.net>
Business:  http://www.Phaseit.net


Relevant Pages

  • RE: Copy a tar file from remote server
    ... > bounces@redhat.com] On Behalf Of Sanjay katiyar ... > the remote server and start showing $ prompt. ... > If I logged off from remote machine then it lost the ... >> machine the script will continue to execute ...
    (RedHat)
  • [EXPL] Psunami Bulletin Board CGI Remote Command Execution
    ... Due to a vulnerability in Psunami Bulletin ... a remote attacker can cause it to execute arbitrary commands as the ... #Psunami Bulletin Board CGI remote command execution ...
    (Securiteam)
  • Re: netsh problem
    ... First get connected to the remote machine using the following command: ... This will get you to the netsh context on the remote server. ... If you want to do it within your automation and execute it on the remote ...
    (microsoft.public.windows.server.networking)
  • [Full-Disclosure] Sending remote procedure calls through e-mail (RPC-Mail)
    ... Have you ever had the need to remotely send a command to a system, ... I propose an alternative - send remote ... periodically execute the application RPC-Mail.py. ... and returns standard output as an e-mail message. ...
    (Full-Disclosure)
  • Re: wshremote not running script on remote computer
    ... If you want to open a command window on a remote machine, ... This is why I want to create this script, ...
    (microsoft.public.scripting.vbscript)