|
|
使用 net::ssh::perl 模块
cat tes.pl
#!/usr/bin/env perl
use Net::SSH: erl;
my $host = $ARGV[0];
my $user = $ARGV[1];
my $pass = $ARGV[2];
my $ssh = Net::SSH: erl->new("$host", options => [
"BatchMode yes", "RhostsAuthentication no" ]);
$ssh->login($user, $pass);
运行时出现错误,该 怎么解决。。。。 如下:
#perl tes.pl 10.0.0.1 root 123456
Can't locate object method "blocking" via package "IO::Handle" at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl.pm line 212, <GEN0> line 1. |
|