nicht gefunden werden Ich habe das SSH-Paket von Perl verwendet, um eine Verbindung zu meinen RHEL-Systemen herzustellen. Ich habe kürzlich eine meiner VM auf redhat-release-server-7.2-9.el7.x86_64 aktualisiert. Nun, wenn ich meinen Perl-Skript leite es wirft den Fehler:Die Objektmethode "exchange" kann über das Paket "Net :: SSH :: Perl :: Kex :: C25519" unter /usr/local/lib64/perl5/Net/SSH/Perl/Kex.pm Zeile 107
Can't locate object method "exchange" via package "Net::SSH::Perl::Kex::C25519" at /usr/local/lib64/perl5/Net/SSH/Perl/Kex.pm line 107. when making the ssh object.
Das gleiche Skript sonst auf meiner 6.8 RHEL-Version arbeiten. Irgendwelche Vorschläge? Hier
ist der Code:
#!/usr/local/bin/perl
use strict;
use warnings;
use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new($server_ip, debug=>1);
$ssh->login("root","password");
Debug Druck:
[[email protected]_linux_10]# perl temp.pl
Automation_linux_[Auto_server_ip]: Reading configuration data /root/.ssh/config
Automation_linux_[Auto_server_ip]: Reading configuration data /etc/ssh_config
Automation_linux_[Auto_server_ip]: Allocated local port 1023.
Automation_linux_[Auto_server_ip]: Connecting to [SERVER_IP], port 22.
Automation_linux_[Auto_server_ip]: Remote version string: SSH-2.0-OpenSSH_6.6.1
Automation_linux_[Auto_server_ip]: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
Automation_linux_[Auto_server_ip]: Net::SSH::Perl Version 2.12, protocol version 2.0.
Automation_linux_[Auto_server_ip]: No compat match: OpenSSH_6.6.1.
Automation_linux_[Auto_server_ip]: Connection established.
Automation_linux_[Auto_server_ip]: Sent key-exchange init (KEXINIT), waiting for response.
Automation_linux_[Auto_server_ip]: Using [email protected] for key exchange
Automation_linux_[Auto_server_ip]: Host key algorithm: ssh-ed25519
Automation_linux_[Auto_server_ip]: Algorithms, c->s: [email protected] <implicit> none
Automation_linux_[Auto_server_ip]: Algorithms, s->c: [email protected] <implicit> none
Can't locate object method "exchange" via package "Net::SSH::Perl::Kex::C25519" at /usr/local/lib64/perl5/Net/SSH/Perl/Kex.pm line 107.
Wir müssen etwas Code sehen. Und es wäre nützlich, die Versionen der Module zu sehen, die auf den beiden Systemen installiert sind. –
Danke für die Antwort Dave. Ich habe den Code und die Debug-Drucke hinzugefügt. –
https://stackoverflow.com/questions/5031334/perls-netssh-vs-ssh2-vs-openssh-how-should-i-compare-them, wenn Sie sich entscheiden, zu wechseln. –