Once again, thanks so far. I have tried the sugested method and I have got a little further. As well as changing my code I have switched on the debug mode. Bellow is the code that I am using

#perl use Net::SSH::Perl; $identity = ".ssh/id_dsa"; $debug_level = 1; $protocol = 1; $host = "192.211.12.45"; $usr = "dm"; $args{identity_files} = [ $identity ]; $args{debug} = [ $debug_level ]; $args{protocol} = $protocol; $ssh = Net::SSH::Perl->new( $host, %args); $ssh->login("$usr");
And here is the output that I get from the code when I run it.
target: Reading configuration data /home/dm/.ssh/config target: Reading configuration data /etc/ssh_config target: Connecting to 192.211.12.45, port 22. target: Remote protocol version 1.99, remote software version OpenSSH_ +3.1p1 target: Net::SSH::Perl Version 1.23, protocol version 1.5. target: No compat match: OpenSSH_3.1p1. target: Connection established. target: Waiting for server public key. target: Received server public key (768 bits) and host key (1024 bits) +. target: Host '192.211.12.45' is known and matches the host key. target: Encryption type: DES3 target: Sent encrypted session key. target: Received encryption confirmation. target: RSA authentication failed: Can't load public key. target: Doing challenge response authentication. target: No challenge presented. target: Trying password authentication. target: Will not query passphrase in batch mode.
It looks to me like I have a problem with the file that I am presenting? Which file should I be presenting, as you can see from the code I am using the id_dsa file.
I hope this error is meaningful to someone :-)

Thanks again so far.

In reply to Re: Net::SSH::Perl Login by alongwor
in thread Net::SSH::Perl Login by alongwor

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.