Ask a Question related to PERL Modules, Design and Development.
-
gnet #1
Net::SFTP problems
I'm trying to get Net::SFTP working and I've spent several hours with
the CPAN shell and ran into a few walls including couple of Math
modules (Math::Pari and Math::PariBuild) and some other Crypt::
dependancies. I finally got everything installed and when I run my
script which contains:
my $sftp = Net::SFTP->new($host, user=>"$username", pass=>"$password");
I get the following error:
Permission denied at
/usr/lib/perl5/site_perl/5.8.0/Net/SFTP.pm line 37
and line 37 in SFTP.pm is:
$ssh->login($param{user}, $param{password});
I can SSH and SFTP into the $host from a command prompt. I'm running
Redhat 9 and I have all the correct modules installed. I've looked
around and have seen that others have been having the same problems but
nobody seems to offer a fix. And and all help would be appreciated.
Thanks
--
Posted via [url]http://dbforums.com[/url]
gnet Guest
-
connection problems - ftp & sftp-pls help!
when we try to connect now (via ftp or sftp) we get the error: "Contribute has disabled your connection to this website because an unknown error... -
SFTP Connection Problems
I'm attempting to set up a new connection using SFTP. Every time I try to connect, I receive a "Please make sure that you have sufficient... -
Aargh. SFTP problems
I have a Windows machine attempting to start an sftp session with a Linux OpenSSH host. I have Net::SSH::SFTP, Net::SSH::W32Perl and required... -
Help with Net::SFTP when sftp on unix works.
Running on AIX, the unix sftp will connect to my site just fine, but the Net::SFTP perl modules hangs at one point. Here are the logs for the... -
cwd with Net::SFTP
There is an option to use 'cwd' with the Net::FTP. How can I perform this action with the SFTP (I didn't find it in the info pages of Net::SFTP)? ... -
gnet #2
Re: Net::SFTP problems
Anyone know how to get $sftp->ls to work. I want to be able to have a
variable/array that contains all the file names and i don't know how to
extract the filename from the "HASH" that CPAN talks about.
--
Posted via [url]http://dbforums.com[/url]
gnet Guest
-
imran #3
Re: Net::SFTP problems
Originally posted by gnet
The $sftp->ls returns the arrays of hashes.> Anyone know how to get $sftp->ls to work. I want to be able to have a
> variable/array that contains all the file names and i don't know how
> to extract the filename from the "HASH" that CPAN talks about.
>
try this code to print all the filenames
@$files=$sftp->ls($remote_dir);
foreach (@$files){
$file=$_;
$filename=$file->{filename};
if($filename ne "." && $filename ne ".."){
print"the filename is $filename";
}
}
try this code to print all the values return by $sftp->ls
@$files=$sftp->ls($remote_dir);
foreach (@$files){
$file=$_;
foreach (sort keys %$_){
print "the value is $_ => $file->{$_}";
}
}
if any dout mail to me at [email]impish_imran@yahoo.co.in[/email]
--
Posted via [url]http://dbforums.com[/url]
imran Guest



Reply With Quote

