I am making use of Net::SFTP::Foreign for downloading files from a remote server, in a perl script which runs as a daemon. It seems to be working on and off. Few times it can successfully download the files but few times it errors off, with the below error message -

debug1: Authentications that can continue: publickey,gssapi-keyex,gssa +pi-with-mic,password debug3: start over, passed a different list publickey,gssapi-keyex,gss +api-with-mic,password debug3: preferred keyboard-interactive,password debug3: authmethod_lookup password debug3: remaining preferred: ,password debug3: authmethod_is_enabled password debug1: Next authentication method: password debug3: packet_send2: adding 32 (len 91 padlen 5 extra_pad 64) debug2: we sent a password packet, wait for reply debug3: Wrote 144 bytes for a total of 1253 debug1: Authentications that can continue: publickey,gssapi-keyex,gssa +pi-with-mic,password debug2: we did not send a packet, disable method debug1: No more authentication methods to try. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

I am making use of password authentication.

my $sftp_obj = Net::SFTP::Foreign->new ( $host, timeout => 3600, ssh_cmd => "/usr/bin/ssh", user => $username, password => $passwd, port => 22, autodisconnect => 0, more => ['-vvv', -o => 'StrictHostKeyChecking no'], );

Please let me know why it fails few times


In reply to Net::SFTP::Foreign works intermittently by JustPerl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.