Running 'sudo' over SSH
        Posted  
        
            by 
                Wesho
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Wesho
        
        
        
        Published on 2010-02-25T09:27:07Z
        Indexed on 
            2013/06/28
            4:23 UTC
        
        
        Read the original article
        Hit count: 527
        
I'm writing a script which is to log onto a bunch of remote machines and run a command on them. I've set up keys so the user running the script does not have to type the password of each machine, but only type in the passphrase in the beginning of the script.
The problem is that the command on the remote machines requires sudo to run. And at the same time the whole point of the script is to rid the user of having to type in passwords multiple times. Is there way to avoid typing in the password for sudo? Changing permissions of the command on the remote machines is not an option.
© Server Fault or respective owner