10/13/2010, "han sun" <sunhan...@gmail.com> you wrote:

>2010/10/12 Irfan Sayed <irfan_sayed2...@yahoo.com>
>
>> now getting following error:
>>
>> Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Cannot find current
>> script
>> './igor_tar.pl' at /home/y/lib/perl5/5.8/FindBin.pm line 188
>> BEGIN failed--compilation aborted at /home/y/lib/perl5/5.8/FindBin.pm line
>> 188.
>>
>> here is the latest code:
>>
>> my $host = "gwbl7001.blue.ygrid.yahoo.com";
>>  my $user = "irfanjs";
>>  my $cmd = "ls";
>>  my $msg;
>>  my %params;
>>  $params{'identity_files'} = '/home/irfanjs/.ssh/identity';
>>  $params{'protocol'} = '2,1';
>>  foreach (sort keys %params) {
>>    print "$_ : $params{$_}\n";
>>  }
>>  my $ssh = Net::SSH::Perl->new($host,%params);
>>  $ssh->login($user);
>>  $ssh->cmd($cmd);
>>
>>
>> any issue with protocol?
>> --irfan

I never used yet this Perl module but I guess you should follow the
syntax used in its examples
( http://search.cpan.org/~turnstep/Net-SSH-Perl-1.34/lib/Net/SSH/Perl.pm )

my $ssh = Net::SSH::Perl->new("host", options => [
        "BatchMode yes", "RhostsAuthentication no" ]);

that is

my $ssh = Net::SSH::Perl->new("gwbl7001.blue.ygrid.yahoo.com",
identity_files => '/home/irfanjs/.ssh/identity', protocol => '2,1');

--
Regards,
Alex

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to