Remote.pm (File::Remote) problem

Remote.pm (File::Remote) problem

am 01.03.2006 03:50:57 von Dayton Jones

I've got a very simple script (see below) that uses the File::Remote
module. I've set up the script to use ssh/scp and there is no problem
for the user to ssh to the hosts - but the script fails with a
"permission denied" error on the copy command.

-- begin script

#!/usr/bin/perl
use File::Remote qw(:replace);

setrsh('/usr/bin/ssh');
serrcp('/usr/bin/scp');
settmp('/tmp');

copy("host1:/tmp/file","host1:/tmp/file2") or die ":: $!\n";

-- end script

On "host1" I can see the connection coming in:
Feb 28 18:46:48 host1 sshd(pam_unix)[20211]: session opened for user
XXXX by (uid=XXX)
Feb 28 18:46:49 host1 sshd(pam_unix)[20211]: session closed for user XXXX


So I don't know what is causing the permissions issue... Any ideas or
suggestions? What do I need to look at, what could be the cause?

Thanks is advance for any help...