I have a simple perl script for SSH to a Linux box. However, each time when I run it, I get the following debug message, followed by a Permission Denied. With the same login ID & password, I can use SecureCRT to SSH into that Linux box. I have search the web to find some hint of how to resolve this problem, but didn't have any luck. Would you please help me? Thank you very much!
------ perl code ------------ use Net::SSH::Perl; use Net::SSH::Perl; my %param = ( protocol => '2,1', ciphers => 'RC4', port => 22, debug => 1, ); my $ssh = Net::SSH::Perl->new("esp-ueh05",%param); my $rc = $ssh->login("esp", "test"); ------debug message--------- AWU: Sent key-exchange init (KEXINIT), wait response. AWU: Algorithms, c->s: arcfour hmac-sha1 none AWU: Algorithms, s->c: arcfour hmac-sha1 none AWU: Entering Diffie-Hellman Group 1 key exchange. AWU: Sent DH public key, waiting for reply. AWU: Received host key, type 'ssh-dss'. AWU: Host 'esp-ueh05' is known and matches the host key. AWU: Computing shared secret key. AWU: Verifying server signature. AWU: Waiting for NEWKEYS message. AWU: Enabling incoming encryption/MAC/compression. AWU: Send NEWKEYS, enable outgoing encryption/MAC/compression. AWU: Sending request for user-authentication service. AWU: Service accepted: ssh-userauth. AWU: Trying empty user-authentication request. AWU: Authentication methods that can continue: publickey,gssapi-with-m +ic,password. AWU: Next method to try is publickey. AWU: Next method to try is password. AWU: Trying password authentication. AWU: Authentication methods that can continue: publickey,gssapi-with-m +ic,password. AWU: Next method to try is publickey. AWU: Next method to try is password. AWU: Trying password authentication. AWU: Authentication methods that can continue: publickey,gssapi-with-m +ic,password. AWU: Next method to try is publickey. AWU: Next method to try is password. AWU: Trying password authentication. AWU: Authentication methods that can continue: publickey,gssapi-with-m +ic,password. AWU: Next method to try is publickey. AWU: Next method to try is password. Permission denied at C:\Perforce\awu_esp\dev\ssit\PC\configSlimcat.pl +line 8

In reply to Net::SSH::Perl - permission denied by anancontigger

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.