[Gllug] Accesing files over the network with perl

Richard Jones rich at annexia.org
Mon Oct 17 08:23:03 UTC 2005


On Mon, Oct 17, 2005 at 08:54:28AM +0100, Gerhardus Geldenhuis wrote:
> I can't use NFS and I can't use FTP to copy the files over.

I'm thinking something like this might work for you:

  open PIPE, "ssh remotehost cat /var/log/apache/access_log|";

Of course this depends on setting up ssh keys appropriately.  You
could even make it a little more secure by having the Perl script run
as a separate user, and setting up the remote ssh account so that it
will only run this one 'cat' command (see sshd(8), section
AUTHORIZED_KEYS FILE FORMAT, subsection command=...).

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list