Witam.
Mam problem z fingerprintem w trakcie połączenie przez ssh przy użyciu perla.
Kod:
#!/usr/bin/perl
use Net::OpenSSH;
use warnings;
use strict;
 
my $port = "22";
my $user = "login";
my $pass = "haslo";
my $plik = "lista";
 
if(open(my $uchwyt, '<:encoding(UTF-8)', $plik))
{
       while(my $linia = <$uchwyt>)
       {
               chomp $linia;
               my $ssh = Net::OpenSSH->new("$user:$pass\@$linia:$port");
               $ssh->system('polecenie') or die "błąd: . $ssh-error";
       }
}
else
{
       warn "Nie można otworzyć pliku '$plik' $!";
}
Wynik:
root@host:~/mngt# ./ssh.pl
lista: . Net::OpenSSH=HASH(0xac8940)->error at ./ssh.pl line 33. (linia $ssh->system('polecenie') or die "błąd: . $ssh-error"; )
root@host:~/mngt# ssh [email protected]
The authenticity of host '10.0.1.234 (10.0.1.234)' can't be established.
DSA key fingerprint is c8:0e:17:44:40:58:3d:89:84:e6:b7:9e:eb:0f:08:65.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.234' (DSA) to the list of known hosts.
[email protected]'s password:

root@host:~/mngt# ./ssh.pl
root@host:~/mngt#
W dokumentacji net::openssh nie widzę nic na ten temat. Czytałem również o bibliotekach do generowania kluczy, fingerprintów np chilkat jednak z przykładów nie widzę jak miałbym to zastosować w moim przykładzie. Proszę o pomoc.