Net :: SSH :: Perl抛出错误/usr/share/perl5/vendor_perl/Net/SSH/Perl/SSH2.pm第92行没有kex算法

时间:2015-09-17 13:47:16

标签: perl ssh net-ssh perlnetssh public-key-exchange

我正在使用Net :: SSH :: Perl连接到Qlogic交换机。当它因以下错误而失败时:

  

/usr/share/perl5/vendor_perl/Net/SSH/Perl/SSH2.pm没有kex算法   第92行

代码:

use Net::SSH::Perl;
$ssh = Net::SSH::Perl->new("$switch_name", protocol=>'2,1',debug=>1);
$ssh->login("USER","$pw");
($stdout,$stderr,$exit) = $ssh->cmd("$cmd");

调试输出:

myserver: Reading configuration data /export/home/ibmi1984/.ssh/config
myserver: Reading configuration data /etc/ssh_config
myserver: Connecting to HFDB12PF26A, port 22.
myserver: Remote protocol version 2.0, remote software version OpenSSH_6.7
myserver: Net::SSH::Perl Version 1.34, protocol version 2.0.
.yserver: No compat match: OpenSSH_6.7
myserver: Connection established.
myserver: Sent key-exchange init (KEXINIT), wait response.
No kex algorithm at /usr/share/perl5/vendor_perl/Net/SSH/Perl/SSH2.pm line 92

有人可以帮我解决这个问题。相同的代码适用于其他设备,只是这个设备有问题。

谢谢,

加里

1 个答案:

答案 0 :(得分:0)

通过将Net :: SSH :: Perl升级到v1.41来解决此问题 感谢提示@daxim