in reply to Re: SFTP Issue
in thread SFTP Issue

Khen
i used your code , still i am getting the same error, the only modification is i gave the password as '' (null).

use strict; use warnings; use Net::SFTP; my $host = '217.154.215.76'; my $remote = '/usr/lib/perl5/site_perl/5.8.8/Net/SFTP.pm'; my $local = '/path/to/Desktop'; my %args = ( user => 'username', password => '', debug => 1 ); my $sftp = Net::SFTP->new($host, %args); #$sftp->get($remote, [$local]);
the error
Permission denied at //pkgs/linux/intel/perl/5.8.0/lib/site_perl/5.8.0/Net/SFTP.pm line 62

In the sftp.pm code, line 62 it corresponds to login , will it not login with null password.

Prasanna

Replies are listed 'Best First'.
Re^3: SFTP Issue
by Khen1950fx (Canon) on Jul 16, 2008 at 17:59 UTC
    I tried it with null password and got permission denied. I tried it without password and got the same thing. It seems to want a password---so try that.
      Khen , Thanks for your reply , actually we are connecting to a vendor for few files , So is it that we need to ask the vendor for passwords to be set for our account.

      if password is set for our account , then will it use the publick keys?

      Also in the NET::SFTP module in SFTP they have mentioned under "password " as "if you use public key authentication, this argument is unused" .

        Check with your vendor concerning auth methods. In my case, my vendors gave me a password when I registered, so I use passwords to connect. Also, if you are using public keys, then yes, Net::SFTP will ignore the password and use public keys, if it is set up correctly.