Hi,
I am pretty new to perl and try to establish a SSH connection with the module Net::SSH::Perl.

When debugging the SSH setup I get the following error:

localhost.localdomain: Reading configuration data /root/.ssh/config localhost.localdomain: Reading configuration data /etc/ssh_config localhost.localdomain: Allocated local port 1023. localhost.localdomain: Connecting to 10.10.10.203, port 22. localhost.localdomain: Remote protocol version 1.99, remote software v +ersion OpenSSH_3.5p1 localhost.localdomain: Net::SSH::Perl Version 1.23, protocol version 2 +.0. localhost.localdomain: No compat match: OpenSSH_3.5p1. localhost.localdomain: Connection established. localhost.localdomain: Sent key-exchange init (KEXINIT), wait response +. localhost.localdomain: Algorithms, c->s: 3des-cbc hmac-sha1 none localhost.localdomain: Algorithms, s->c: 3des-cbc hmac-sha1 none localhost.localdomain: Entering Diffie-Hellman Group 1 key exchange. localhost.localdomain: Sent DH public key, waiting for reply. localhost.localdomain: Received host key, type 'ssh-dss'. localhost.localdomain: Host '10.10.10.203' is known and matches the ho +st key. localhost.localdomain: Computing shared secret key. localhost.localdomain: Verifying server signature. localhost.localdomain: Waiting for NEWKEYS message. localhost.localdomain: Enabling incoming encryption/MAC/compression. localhost.localdomain: Send NEWKEYS, enable outgoing encryption/MAC/co +mpression. localhost.localdomain: Sending request for user-authentication service +. localhost.localdomain: Service accepted: ssh-userauth. localhost.localdomain: Trying empty user-authentication request. input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.0/i386-linu +x-thread-multi/Crypt/DES.pm line 57.
my script calls the SSH in the following way:
print "Enter your username: "; chomp(my $user = <STDIN>); print "Enter your pass on that host: "; chomp(my $user = <STDIN>); my $ssh = Net::SSH::Perl->new($ip,protocol => '2', cipher => '3des-cbc +', debug =>'1', interactive => '1'); $ssh->login($user,$pass); ... etc.
Any Idea where the error comes from ?

Looking forward to hearing any ideas ...

Markus

20030714 Edit by Corion: Added CODE tags


In reply to Input Type Error when setting up a SSH connection with Net::SSH::Perl by BananaJoe

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.