I am trying to automate the retrieval of a set of files from multiple
servers with different logins and passwords. When I try to use
scalars to change the user name and passwords it fails with a complaint
that I don't have enough input for DES to work. So, this works:
my %parms = ( user => “phil”, password => “testme” ); my $sftp = Net::SFTP->new($sadder, % parms) ;

it connects and I can get stuff. On the other hand, this won't:

my $user = “phil” ; my $pass = “testme” ; my %parms = ( user => $user, password => $pass) ; my $sftp = Net::SFTP->new($sadder, % parms) ;

I get the debug output:

bast: Reading configuration data /home/mumble/.ssh/config bast: Reading configuration data /etc/ssh_config bast: Connecting to mumble.mumble.mumble.mumble, port 22. bast: Remote protocol version 1.99, remote software version OpenSSH_3. +5p1 bast: Net::SSH::Perl Version 1.25, protocol version 2.0. bast: No compat match: OpenSSH_3.5p1. bast: Connection established. bast: Sent key-exchange init (KEXINIT), wait response. bast: Algorithms, c->s: 3des-cbc hmac-sha1 none bast: Algorithms, s->c: 3des-cbc hmac-sha1 none bast: Entering Diffie-Hellman Group 1 key exchange. bast: Sent DH public key, waiting for reply. bast: Received host key, type 'ssh-dss'. bast: Host 'mumble.mumble.mumble.mumble' is known and matches the host + key. bast: Computing shared secret key. bast: Verifying server signature. bast: Waiting for NEWKEYS message. bast: Enabling incoming encryption/MAC/compression. bast: Send NEWKEYS, enable outgoing encryption/MAC/compression. bast: Sending request for user-authentication service. bast: Service accepted: ssh-userauth.bast: Trying empty user-authentic +ation request. input must be 8 bytes long at /usr/local/lib/perl5/site_perl/5.8.5/i68 +6-linux/Crypt/DES.pm line 57.

Any one have a clue for me?

Updated Steve_p - added code tags


In reply to Net::SFTP problem, an odd twist. by Anonymous Monk

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.