- 论坛徽章:
- 0
|
在测试该模块的时候出现了一个问题
代码:(模块来自soulcage)
___
use Net::SSH: erl;
my $host= '172.16.1.2';
my $username= 'root';
my $password= 'cc';
my $cmd= '/sbin/ifconfig';
my $ssh = Net::SSH: erl->new($host,protocol =>2,port =>22,debug=>1,options => [ "BatchMode yes", "RSAAuthentication no"," asswordAuthentication yes" ]);
$ssh->login($username,$password);
my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
print "$stdout, $stderr, $exit\n";
——————错误提示
: Reading configuration data /.ssh/config
: Reading configuration data /etc/ssh_config
: Connecting to 172.16.1.2, port 22.
: Remote protocol version 1.99, remote software version OpenSSH_4.6
: Net::SSH: erl Version 1.23_01, protocol version 2.0.
: No compat match: OpenSSH_4.6.
Your vendor has not defined Fcntl macro F_SETFL, used at C:/Perl/site/lib/Net/SSH/Perl.pm line 218.
____
为什么会不匹配?1.99 是协议版本?而且我在将openssh从3.9 升级到4.6 还是个1.99 .ssh协议不是1/2吗 |
|