[Ssh-sftp-perl-users] bind socket problem
Brought to you by:
dbrobins
|
From: <gd...@te...> - 2005-06-13 15:24:46
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hello,
I've sent a mail to this list about two month ago, concerning a socket
bind problem. I'm a bit surprised nobody got concerne about this
problem, the first time, so I tought I might ask again.
I made a script that connects to different computers via ssh.
basically, all the computer's ip are in a file, my script reads the
file, gets the ip adresse, connects via ssh, loops and get the next ip
from the file.
First connection works fine, but when it's time to connect to the next
one, I get a message saying :
Net::SSH:can't bind on socket to port 1023
when I do a netstat, I see the connection is up for about a minute
then disappears.
has anybody done a multi ssh connection script who hasn't come up with
this problem ?
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' => \@ids,
);
$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");
(...)
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCraWFwU9DjvfD8u4RAjPvAJ9+PrXNwJoRfU63kJMtKdvM1lSOUgCfRI56
hKJkEMFqMj3QnjxTMaeV1oI=
=EQSB
-----END PGP SIGNATURE-----
|