in reply to Re^2: Net::SFTP Problem
in thread Net::SFTP Problem

oh, I thought you were using ssh keys for authentication instead of the login and clear password aproach not supported by that Net::SFTP::Foreign.

Is there any reason why you are not using public keys for authentication?

Replies are listed 'Best First'.
Re^4: Net::SFTP Problem
by Zoop (Acolyte) on Jun 07, 2005 at 12:10 UTC
    Hi Salva,
    I have to use ssh keys authentication but i am not aware of the method to use it in my code. Can you Please suggest what steps do i require to modify my previous code to use ssh keys authentication. I have OpenSSH_3.8.1p1 and OpenSSL 0.9.7d installed on AIX box.
    Thanx in advance
    Zoop
    'When You starve With A Tiger, The Tiger always starves last'
      well, you have to do nothing.

      Are you able to connect from the source to the target machine manually with ssh? ensure that you check it as the same user as the one that runs the script.

      Oh, I see what the problem is:

      %args={port => $portnumber ,host =>$host ,user => $username ,debug => +1};
      is wrong, you have to write it as
      %args=(port => $portnumber ,host =>$host ,user => $username ,debug => +1);
      using (...) instead of {...}

      BTW, you would have already noticed it if you were using

      use strict; use warnings;
      on your code!!!!!!!!!
        Hi salva,
        That worked. I changed the {} to () and i got the remote listing.Thank you very much for your help..

        BTW where are you located on globe....
        Zoop
        'When You starve With A Tiger, The Tiger always starves last'