in reply to Re^2: get ssh key passphrase from agent
in thread get ssh key passphrase from agent

I don't get any error, but the script you posted doesn't output anything unless I change the version of the agent to 2.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: get ssh key passphrase from agent
by ninto1 (Novice) on Aug 31, 2022 at 07:28 UTC

    I still get the same error, even if I change it.

    Could you please elaborate furhter, what you did to make it work?

      I replaced
      my $agent = Net::SSH::Perl::Agent->new(1); # ~
      with
      my $agent = Net::SSH::Perl::Agent->new(2); # ~

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

        Yes. I did that too, but it still gives me the error.

        What OS are you on, and how do you execute the script?