Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Thanks for the reply.
I tried that but adding the utf8::downgrade only made my variable change to '1'.
Here is my code
use Net::SSH::Perl; use XML::Simple; do "routines/Log.pm"; my $c_rsync = "$Bin/conf/plugins/rsync.xml"; unless (-e "$c_rsync" ) { Log ( $l_plugin , "no config file was found, exiting" ); exit; } my $xml_conf = eval { XMLin ( $c_rsync , ForceArray => [ 'rsync' ] , K +eyAttr => {} , KeepRoot => 0 ) }; if ($@) { Log ( $l_plugin , "failed to load plugin \'rsync\' xml.\nReason: $ +@" ); exit; } my ( @rFolder , @rUser , @rIp , @rHome , @rProxy ); foreach (@{ $xml_conf -> {'plugin'} -> {'rsync'} }) { push ( @rFolder , $_ -> {'loc'} ); push ( @rUser , $_ -> {'uname'} ); push ( @rIp , $_ -> {'ip'} ); push ( @rHome , $_ -> {'fol'} ); if ( defined ( $_ -> {'proxy'} ) ) { push ( @rProxy , $_ -> {'proxy'} ); } else { push ( @rProxy , 0 ); } } my $cV = 0; foreach ( @rFolder ) { my $rSsh = Net::SSH::Perl -> new ( $rIp[$cV] , protocol => '2,1' , ide +ntity_files => [ "/root/rsync/$rUser[$cV]-rsync-key" ] , debug => 1 ) +; $rSsh -> login ( $rUser[$cV] ); my ( $oMsg , $oErr , $oExit ) = $rSsh -> cmd ( "du" ); print "$oMsg"; $cV++; } exit;
I removed the parts not related to the Net::SSH::Perl stuff.
The code works great when I replace $rSsh -> login ( $rUser[$cV] ); with $rSsh -> login ( 'yams-dev' );
and $rUser[$cV] is definatley giving 'yams-dev' without any newlines on the end or anything odd like that.
This is the debug output I'm getting:
suse-build: Reading configuration data /root/.ssh/config suse-build: Reading configuration data /etc/ssh_config suse-build: Allocated local port 1022. suse-build: Connecting to 87.117.247.76, port 22. suse-build: Remote protocol version 1.99, remote software version Open +SSH_3.4p1 suse-build: Net::SSH::Perl Version 1.34, protocol version 2.0. suse-build: No compat match: OpenSSH_3.4p1. suse-build: Connection established. suse-build: Sent key-exchange init (KEXINIT), wait response. suse-build: Algorithms, c->s: 3des-cbc hmac-sha1 none suse-build: Algorithms, s->c: 3des-cbc hmac-sha1 none suse-build: Entering Diffie-Hellman Group 1 key exchange. suse-build: Sent DH public key, waiting for reply. suse-build: Received host key, type 'ssh-dss'. suse-build: Host '87.117.247.76' is known and matches the host key. suse-build: Computing shared secret key. suse-build: Verifying server signature. suse-build:/home/matt/rsync # perl rsync.pm suse-build: Waiting for NEWKEYS message. suse-build: Send NEWKEYS. suse-build: Enabling encryption/MAC/compression. suse-build: Sending request for user-authentication service. suse-build: Service accepted: ssh-userauth. suse-build: Trying empty user-authentication request. input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.8/i586-linu +x-thread-multi/Crypt/DES.pm line 56.

In reply to Re^6: Weird error with Cryprt::Blowfish and Crypt::DES by Anonymous Monk
in thread Weird error with Cryprt::Blowfish and Crypt::DES by Beechbone

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!
  • 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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2015-07-02 23:18 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (47 votes), past polls