![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Security Discuss UNIX and Linux computer and network security, cybersecurity, cyberattacks, IT security, CISSP, OWASP and more. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| As root , running script as different user with su - problem | dbsupp | Shell Programming and Scripting | 4 | 12-18-2008 01:28 AM |
| running X-11 programs as root | Allasso | UNIX for Advanced & Expert Users | 8 | 12-28-2007 03:22 PM |
| Running out of Space (Root) | scorpiyanz | UNIX for Advanced & Expert Users | 0 | 08-19-2005 11:22 AM |
| Running a command or script as root | rm-r | Shell Programming and Scripting | 3 | 05-27-2005 09:58 AM |
| running a scr in rc3.d not as root, can i? | kymberm | UNIX for Advanced & Expert Users | 6 | 11-12-2002 11:50 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Running script through SSH as root
Hi all,
I have a situation where I have a shell script that I need to run remotely on multiple *nix machines via SSH. Unfortunately, some of the commands in it require root access. I know that best practices for ssh entail configuring it so that the root account cannot log in, you need to elevate to root via su after logging in with a regular account. Unfortunately, this seems to leave me in a dilemma: How in a script can I elevate to root, since it will prompt me for a password that I will not be there to enter? Or, is there some other alternative from an advanced security perspective that will allow me to log in with an account that has root level access to the machine (but isn't the actual "root" account)? Finally, just to head this off: No, I cannot set the script up in crontab to run as root at a certain time/frequency. The requirements for this script to run is: 1) SCP it to /var/tmp; 2) Execute via SSH as root or root-equivalent; 3) scrape the output; 4) Execute "rm /var/tmp/script.sh" via SSH to remove it. Any suggestions? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|