[paramiko] Handling sudo
Christian Vest Hansen
karmazilla at gmail.com
Tue Feb 26 05:45:48 PST 2008
I've written a tool that does something like that.
It might be a bit dense, but the interesting part of the code is here:
http://git.savannah.nongnu.org/gitweb/?p=fab.git;a=blob;f=fabric.py;h=1e28fecfa514714dfc3864fd17491da0f2f04e40;hb=da84c94a8955a4a9bdeb467d689bbee432ff8f6d#l258
The 'client' parameter is a paramiko.SSHClient. And don't pay
attention to how it handles printing of sudo's output - that part is
broken.
On 2/26/08, Justin Cook <jhcook at gmail.com> wrote:
> Has anyone developed any code to handle sudo or any advice on best
> implementation? We need to connect to various servers and execute
> commands using sudo, but what would be the best way to handle the
> password and caching mechanisms of sudo?
>
>
> --
> Justin Cook
>
> _______________________________________________
> paramiko mailing list
> paramiko at lag.net
> http://www.lag.net/cgi-bin/mailman/listinfo/paramiko
>
--
Venlig hilsen / Kind regards,
Christian Vest Hansen.
More information about the paramiko
mailing list