in reply to Re^2: SFTP Issue
in thread SFTP Issue

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.

Replies are listed 'Best First'.
Re^4: SFTP Issue
by prasanna14 (Initiate) on Jul 16, 2008 at 18:25 UTC
    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.
        Khen
        if we use password to authenticate , will it use the public keys then..(just wanted to know) iused the following piece of code , it seems to connect and sending the "ls" command, but i am not getting any reply back

        use strict; use warnings; use Net::SSH::Perl; my $host = "217.154.215.76"; my $user = "etrade"; my $cmd = "ls rolling*"; my $ssh = Net::SSH::Perl->new($host, debug => 1, identity_files => ["/ +etrade/home/ibia_ir/.ssh/id_rsa"], protocol=>'2,1'); $ssh->login($user); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print "$stdout"; print "$stderr"; print "$exit";