in reply to get ssh key passphrase from agent

Net::SSH2 claims to be able to do authentication through an agent. The other modules don't seem to do that, so I'm not sure if it is possible without using Net::SSH2.

One thing I've done in such cases is to run commands through plink or ssh external binaries, but that only works for very limited use cases.

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

    I looked into it, and it seems to be just what I need!

    Imma just try to implement it, and I will let you know, once I definately know if it works

    Thank you a lot

      I tried to make a sample, which test everything I need from the module, but sadly I get an error, which I can't explain:

      failed connecting agent (-42 LIBSSH2_ERROR_AGENT_PROTOCOL) at .\sshtest.pl line 7.

      I think it should work, because the agent works just fine in CMD.

      I would appreciate any help!

        Crossposted to StackOverflow.

        It's considered polite to inform about crossposting, so that people not attending both sites don't waste their efforts hacking a problem already solved at the other end of the internets.

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

        Can you post your example code which fails for you, so we can try to replicate your situation?