Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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/"; 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, 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 '' is known and matches the host key. suse-build: Computing shared secret key. suse-build: Verifying server signature. suse-build:/home/matt/rsync # perl 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/ 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

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, 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?

    What's my password?
    Create A New User
    [oiskuu]: marto, it ended badly? I doubt the power is easy to plug at those installations?
    [marto]: oiskuu sadly yes
    [Your Mother]: My cat used to climb into the freezer when I opened it. Once I closed it and left him for 5 minutes hoping to disuade the habit. When I opened it expecting a cat eager to never return he just stared at me. Had to pull him out.
    [Your Mother]: oiskuu, I think we should just be friends.
    [marto]: the 'cool' place to hang out
    [Your Mother]: ♫ Caffeine, caffeine, caffeine, caffeine. There will be answer, caffeine. ♫ ♬
    [oiskuu]: Ahh, old cats with rheuma. I think (s)he was saying, "dude, NOT cold enough."

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (13)
    As of 2017-12-18 15:04 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (488 votes). Check out past polls.