[tpm] Net::SCP and Net::SFTP modules
Henry Baragar
Henry.Baragar at instantiated.ca
Sun Nov 9 15:23:20 PST 2008
I have been trying to use Net::SFTP: it works when I run the application from
the shell, but not under cron!
Here is my code:
sub deliver {
my $self = shift;
my ($host,$directory,%cred) = $self->parse_address;
my $sftp = Net::SFTP->new($host, %cred);
my $path = $directory . $self->file_name;
my $flags = SSH2_FXF_WRITE | SSH2_FXF_CREAT | SSH2_FXF_TRUNC;
my $handle = $sftp->do_open($path, $flags);
$sftp->do_write($handle,0,$self->payload);
$sftp->do_close($handle);
# return value not used
}
I have written a message to the Ssh-sftp-perl-users list, but have yet to
receive any useful information.
The error message is:
input must be 8 bytes long
at /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Crypt/DES.pm line
57
This is being run under:
SUSE Linux version 2.6.16.27-0.6-smp
perl v5.8.8 built for x86_64-linux-thread-multi
$Net::SFTP::VERSION: 0.10
$Net::SSH::Perl::VERSION: 1.30
Any help would be appreciated.
Regards,
Henry
On Sunday, November 09 2008 10:23 am, arocker at vex.net wrote:
> Has anybody any experience with these modules? I'm trying to implement
> something in "Arab gynaecologist" mode (I can't look at or touch what I'm
> supposed to be fixing), so any real expertise would be helpful.
>
> As the original problem is merely to send a known file to a single
> destination, should I concentrate on SCP?
>
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm
More information about the toronto-pm
mailing list