tekka has asked for the wisdom of the Perl Monks concerning the following question:
The same doesn't work ootb if the inner is a perl script.env SSH_AUTH_SOCK=$SSH_AUTH_SOCK inner_script.sh
I found on the web about Net::SSH::Perl::Agent that seems to be the thing for me but I don't understand how to use it (I'm a very beginner in perl and the perl script is not totally under my control...) to be able to inherit the env SSH_AUTH_SOCK and use it to automatically talk with the ssh- agent.
Any hints/example?
I don't know if this makes any difference, but the way my rdist commands are called inside the perl script is something like:
So I would like the rdist command not to ask for passhprase for every host it has to process...my $command="rdist $RDIST_OPTIONS"; open(RDIST, "$command 2>&1 |" ) || die("$basename: Unable to open $command\n"); my $errorcount = 0; while ( <RDIST> ) { ... some other commands/conditional statements ... }
Thanks in advance,
Gianluca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to talk to ssh-agent from inside a perl script
by Khen1950fx (Canon) on Mar 05, 2010 at 10:14 UTC | |
|
Re: How to talk to ssh-agent from inside a perl script
by salva (Canon) on Mar 05, 2010 at 10:44 UTC | |
by tekka (Initiate) on Mar 16, 2010 at 12:08 UTC |