Hi Chas,

I was not given the proper arguments to the  *new* function. That is why, it
was failed to connect. This time I have another trouble. As part of my code,
I have used the below to statments to list the files in the directory.

 my @ls = $sftp->ls("$srcDir/");
   print "\n----------------->@ls\n";

But I am not getting the output eventhough the directory got some files
except "------------------->" part. sometimes I am getting the output as
below:

---------------------> HASH(0xd03334) HASH(0xd033dc) HASH(0xd03498)
HASH(0xd03540) HASH(0xd035e8) HASH(0xd03690) HASH(0xd03738) HASH(0xd037e0)
HASH(0xd044a4) HASH(0xd0454c) HASH(0xd045f4) HASH(0xd0469c) HASH(0xd04744)
HASH(0xd047ec) HASH(0xd05da0) HASH(0xd05dac) HASH(0xd05e24) HASH(0xd05e9c)
HASH(0xd05f50) HASH(0xd0601c) HASH(0xd060c4) HASH(0xd0616c) HASH(0xd06214)
HASH(0xd062bc) HASH(0xd06364) HASH(0xcdbc20) HASH(0xcdbcc8) HASH(0xcdbd70)
HASH(0xcdbe18) HASH(0xcdbec0) HASH(0xcdbf68)

I am not sure about the return value of the $sftp->ls(). I thought it will
return a list as in Net::FTP.  How I should use it? Please help me.

Thanks,
Rajeev Kilaru


On 8/16/07, Chas Owens <[EMAIL PROTECTED]> wrote:
>
> On 8/16/07, kilaru rajeev <[EMAIL PROTECTED]> wrote:
> snip
> > > Another common problem is that different versions of Unix (and Linux)
> > > use different implementations of ssh.  This isn't a problem for most
> > > things, but they tend to use different formats for the private and
> > > public key files.  You may have to convert the key generated on one
> > > platform to the format expected by another.
> snip
> > I had generated the Key pair. I installed the public key on the server.
> And,
> > while generating the keys I had not passed any passphrase. That is why,
> it
> > is not asking for the password/passphrase while connecting. I guess we
> need
> > to provide the configuration details in our program while connecting to
> the
> > server.
> snip
>
> If you did not provide a passphrase then the key is unencrypted.
> Depending on what you want to do, this is a good thing.  It is common
> for program accounts (as opposed to user accounts) to have unencrypted
> keys since it removes the complications of have to use ssh-agent.
> However, your response did not answer the primary question: can you
> connect to the other box from the command line without typing a
> password?
>
> If you can and Perl is having a problem doing the same then there is
> something wrong with the installation of Net::SCP, if you can't then
> the problem is most likely incompatible key types (since you have
> ruled out encrypted keys as a problem).
>

Reply via email to