Welcome to the Monastery | |
PerlMonks |
Re: Net::SSH::Perl and getting User from configby Don Coyote (Hermit) |
on May 02, 2015 at 08:21 UTC ( [id://1125432]=note: print w/replies, xml ) | Need Help?? |
Hello. The problem is not in the connecting logic, but in the extraction of the users from the config file. To suggest solution to this we need to see your config extraction code. As an exercise, I have assumed the config file is not extracted automatically from an ssh method. Untested
Now your users are inside an anonymous array, keyed by the hostname, in an anonymous hash, keyed by the index of hosts. To retrieve:
Using a similar approach, you can optimise down the config file and potentially remove the 'index_of_hosts' level from the %HOSTLISTS hash This would make the extraction logic simpler.
Many Meek Monks Monikers Mention Meekness
In Section
Seekers of Perl Wisdom
|
|