You could use the CPAN module Net::SSH
http://search.cpan.org/~ivan/Net-SSH-0.09/SSH.pm.

- Install the module on you local PC.
- Create a non-privileged user on the remote server
- Create SSH certificate for the non-privileged user on the remote machine
- Use the non-privileged user to run remote commands from your local from
SSH.pm "ssh_cmd()".

HTH

Mimi

On 23/06/2008, Stewart Anderson <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm sure there  are a zillion ways  of doing this,  but  rather than
> re-invent the wheel  I thought I'd use my best skill -  "The  ability to
> ask someone else and plaguerise :)"
>
>
> So,  I  would like to poll a remote server (production app server)  find
> files (log files) in a  specific directory  tree (recursive)  and  copy
> any over,  say day old,  to  the local machine.
>
> I would  like to do it  in a secure way using ssh or some such
> mechanism.  I can't put anything on the production machine,  at best  I
> could  have  it run a job to prepare a list of files for the remote to
> poll and  trawl through.
>
> All pointers and  suggestions appreciated :)
>
> Stu.
>
>
>
> Ps   Why  you ask?  Well,  there is no log file  retention policy,
> logging is done locally and  there is not enough disk to keep the log
> files for  the period they are usually required  -   Yes I know  -
> Please don't ask !!
>
>
>
> Information in this email including any attachments may be privileged,
> confidential and is intended exclusively for the addressee. The views
> expressed may not be official policy, but the personal views of the
> originator. If you have received it in error, please notify the sender by
> return e-mail and delete it from your system. You should not reproduce,
> distribute, store, retransmit, use or disclose its contents to anyone.
> Please note we reserve the right to monitor all e-mail communication through
> our internal and external networks. SKY and the SKY marks are trade marks of
> British Sky Broadcasting Group plc and are used under licence. British Sky
> Broadcasting Limited (Registration No. 2906991), Sky Interactive Limited
> (Registration No. 3554332), Sky-In-Home Service Limited (Registration No.
> 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are
> direct or indirect subsidiaries of British Sky Broadcasting Group plc
> (Registration No. 2247735). All of the companies mentioned in this paragraph
> are incorporated in England and Wales and share the same registered office
> at Grant Way, Isleworth, Middlesex TW7 5QD.
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>

Reply via email to