The stupid question is the question not asked | |
PerlMonks |
Re: Expect OpenSSH sudo login is failingby thanos1983 (Parson) |
on Apr 21, 2017 at 10:31 UTC ( [id://1188533]=note: print w/replies, xml ) | Need Help?? |
Hello archeman2, Since you are using already Net::OpenSSH why don't you use Running remote commands with sudo (FAQ) which already implemented? I had similar problem in the past and I have tried many modules trying to resolve it (Best module to execute administrator commands on external operating systems (Linux)). I do not know if you are interested it can also be achieved with parallel ssh connections running ssh commands (Net::OpenSSH::Parallel with sudo commands). From my point of view I would set up ssh-exchange as root so you do not need to provide password when you ssh and then apply the commands that you want as root. This is much much more safer than applying psw through ssh. Think about it. Hope this helps.
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|