On Feb 3, 3:38 pm, jul.col...@gmail.com (Julien Collas) wrote:
> Hi everyone,
>
> I made a script using Net::SSH::Perl and I'm faced to some slowconnexiontimes.
> I use rsa key to connect and it seems to be very slow, but not all the time.
> Sometimes it's very quick ( 1sec ), sometimes not (few minutes).
> I tried to use password instead of a key, and it seems to be quicker.
> You may have an idea to help me ....
> Thanks
>
> Here is the script :
>
> #!/usr/bin/perl -w
>
> use strict;
> use Net::SSH::Perl;
>
> my $server = '127.0.0.1';
> my $user = 'vmx';
> my $dsa = './vmx.key';
> my $pwd = 'toto';
> my $command = '/bin/pwd';
> my $ssh;
>
> if( $ARGV[0] && "$ARGV[0]" =~ m/key/ ) {
>         my %params = ( identity_files => [$dsa] );
>         $ssh = Net::SSH::Perl -> new($server, %params);
>         $ssh -> login($user);}
>
> else {
>         $ssh = Net::SSH::Perl -> new($server);
>         $ssh -> login($user, $pwd);
>
> }
>
> my($stdout,$stderr,$exit) = $ssh -> cmd($command);
> if($stderr) {
>     print "stderr : "."$stderr";}
>
> print "stdout : "."$stdout";
>
> --
> Julien Collas
> jul.col...@gmail.com

I am having similar problems.  I traced it back to
Crypt::DSA::Util::makerandom, where it tries to read from /dev/
random.  Problem is that I'm on a virtual machine with little/no
entropy.

Is there a way to get this module to get random numbers elsewhere?

Thanks


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to