Haim Ashkenazi wrote:
> Hi
>
> I'm trying to write a simple ssh login script using Net::SSH::Perl. with
> regular password It's working without a problem, but when I try to use dsa
> key (my usual dsa key) it doesn't work.
>
> here's the scritp:
>
> ----------------------------------------------------
>
> #!/usr/bin/perl -w
>
> use strict;
> use Net::SSH::Perl;
> use Net::SSH::Perl::Auth;
>
> my @ids = ("/home/haim/.ssh/identity");
>
> my %params = {
> protocol => 2,
> interactive => 1,
> identity_files => [EMAIL PROTECTED],
> };
%params edclares a hash.
{} assigns a scalar reference to an anonymous hash.
They are not the same data type [aka storage category]
> ....
> When I run this script I get an error:
> Reference found where even-sized list expected at login.pl line 10.
[snip--all errors beyond the first are irrelavant]
> can anyone please help?
Try changing the braces around your hash to parens, to properly offer a list as a
hash initiator. Or nake params a scalar $params.
Try one xor the other of these, and let us know what results you get then. You have
not yet begun to test the Net::SSH functionality, because your code does not get
executed.
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]