Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^6: Weird error with Cryprt::Blowfish and Crypt::DES

by Anonymous Monk
on Mar 03, 2009 at 12:45 UTC ( #747713=note: print w/replies, xml ) Need Help??

in reply to Re^5: Weird error with Cryprt::Blowfish and Crypt::DES
in thread Weird error with Cryprt::Blowfish and Crypt::DES

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://747713]
[Corion]: GrandFather: Ah, (hardware) APIs - I have a similar situation with Chrome and its API... It is fairly underdocumented and I guess I have to hunt...
[Corion]: ... down supposedly working code to find out what I'm supposed to do
[GrandFather]: I haven't any "working code" to inspect! I have to find ways to generate reference signals then check the numbers I get at the far end match.
[GrandFather]: That's ok when the signal is a voltage, but there are three axis accelerometers, gyroscopes and magnetometers in these things! A little invention is needed at times!
[Corion]: GrandFather: Yeah, in that aspect, hardware is far more a black box than software
[GrandFather]: Oh, and the manufacturer tells lies too! I'm sure they don't mean to, but I know for sure some of the stuff they say is just wrong. It's possible they don't understand what we are asking, but that's not a good look either
[Corion]: GrandFather: Ah, unit testing hardware is fun, especially when the hardware is uncalibrated ...
[GrandFather]: Us: "What scaling do we need to apply to the numbers from the SDK for the wibble?". Them: "Oh, the numbers from the SDK for the wibble are already correct, they don't need scaling"

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-08-24 07:11 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (365 votes). Check out past polls.