How to run a script in Ubuntu via SSH as superuser?
Posted
by Irinotecan
on Server Fault
See other posts from Server Fault
or by Irinotecan
Published on 2010-04-21T22:16:08Z
Indexed on
2010/04/21
22:23 UTC
Read the original article
Hit count: 234
So I have a script that needs to be executed remotely as root. This isn't a problem with most Linux distros since they have a root account. But since Ubuntu does not, executing anything as root requires a 2-step process of entering the account password twice - once to log in and once for sudo. The SSH process to launch the script is automated, so it cannot pause for user input for the second password request.
Does anyone know, short of hacking Ubuntu to re-enable root (not an option), if unattended SSH script execution with superuser privilege on the target machine is possible? Also, having no experience with Debian, does Debian behave this way too?
© Server Fault or respective owner