----- Original Message ----- From: gui <[EMAIL PROTECTED]> Date: Monday, April 4, 2005 3:16 pm Subject: Net::SSH::Perl bind socket problem
> hello, > > I'm making a simple script that's supposed to update a certain > number of > boxes, spread around the area. > my script is supposed to to connect to every hosts (via a file > named > "hosts") using ssh, launch wget to retrieve the patch update, and > install it. > Things work fine for the first host of the list. But can never get > beyong that. I get a "Net::SSH: Can't bind socket to port 1023: > Adresse > déjà utilisée at ./test_ssh.pl line 46" message. > > my question is, how can I unbind the socket used by Net::SSH::Perl ? not sure about the answare, but why dont you try to debug the comunication > > here's part of my code: > > use strict; > use Net::SSH::Perl; > > my ($patchurl,$stout,$sterr,$exit,$ssh); > my @ids = "$ENV{HOME}/.ssh/id_rsa"; > > my %params = ( > 'protocol' => 2, > 'identity_files' => [EMAIL PROTECTED], 'port' => 22, 'debug' => 1, > ); > > $patchurl = push @ARGV > > open HOSTS, "hosts" or die "je n'ai pas réussi à ouvrir le fichier > hosts > : $!"; > > while(<HOSTS>){ > > (...) > > $ssh = Net::SSH::Perl->new($_, %params); > $ssh->login("root"); > ($stout,$sterr,$exit) = $ssh->cmd("wget -q $patchurl"); > > (...) > } > > > thanks > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>