$args{identity_files} = [ $identity ]; # takes ARRAY $args{protocol} = '2,1'; # try v2 first #### use Net::SSH::Perl; $ssh = Net::SSH::Perl->new( "rtrfoo", { identity_files => ["$ENV{HOME}/.ssh/id_dsa"], protocol => "2" } ); $ssh->login("myself"); print "@{[$ssh->cmd(q(show version))]}" __END__ Hostname: rtrfoo Model: m20 JUNOS Base OS boot [5.6R2.4] JUNOS Base OS Software Suite [5.6R2.4] ...