Re: [CentOS] SSH Remote Execution - su?

2010-03-04 Thread John Doe
From: Tim Nelson tnel...@rockbochs.com I'm about to embark on some remote management testing and need a way to login to a remote system running CentOS 4.x/5.x via SSH, su to root (using a password), then execute a command. Maybe try /etc/securetty JD

Re: [CentOS] SSH Remote Execution - su?

2010-03-04 Thread Chris Murphy
I used to manage ~150 Linux desktop and would have to do one off scripts to make updates. Fortunately I found Puppet and now I never have to do things like this any more but here's the Bash/Expect combo that I used to use: chris$ ./mass_copy.sh: #!/bin/sh export ROOTPW='secret1' export

Re: [CentOS] SSH Remote Execution - su?

2010-03-04 Thread Les Mikesell
On 3/4/2010 10:16 AM, Chris Murphy wrote: I used to manage ~150 Linux desktop and would have to do one off scripts to make updates. Fortunately I found Puppet and now I never have to do things like this any more but here's the Bash/Expect combo that I used to use: chris$ ./mass_copy.sh:

Re: [CentOS] SSH Remote Execution - su?

2010-03-04 Thread Tim Nelson
- Les Mikesell lesmikes...@gmail.com wrote: What's the problem with key-based ssh directly as root? Not a thing, except I'd have to login and update that many systems before I'm able to get any real work done. Maybe I'll use the presented expect scripting (very similar to my test run)

Re: [CentOS] SSH Remote Execution - su?

2010-03-04 Thread Les Mikesell
On 3/4/2010 10:58 AM, Tim Nelson wrote: What's the problem with key-based ssh directly as root? Not a thing, except I'd have to login and update that many systems before I'm able to get any real work done. Maybe I'll use the presented expect scripting (very similar to my test run) to get

Re: [CentOS] SSH Remote Execution - su?

2010-03-04 Thread Todd Rinaldo
On Mar 4, 2010, at 10:58 AM, Tim Nelson wrote: - Les Mikesell lesmikes...@gmail.com wrote: What's the problem with key-based ssh directly as root? Not a thing, except I'd have to login and update that many systems before I'm able to get any real work done. Maybe I'll use the

[CentOS] SSH Remote Execution - su?

2010-03-03 Thread Tim Nelson
Greetings All- I'm about to embark on some remote management testing and need a way to login to a remote system running CentOS 4.x/5.x via SSH, su to root (using a password), then execute a command. I currently login to the boxes using key based SSH like this: ssh -i ~/remote_key

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread James Hogarth
On 3 March 2010 21:20, Tim Nelson tnel...@rockbochs.com wrote: Greetings All- I'm about to embark on some remote management testing and need a way to login to a remote system running CentOS 4.x/5.x via SSH, su to root (using a password), then execute a command. I currently login to the

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread Jeremy Rosengren
On Wed, Mar 3, 2010 at 3:36 PM, James Hogarth james.hoga...@gmail.comwrote: On 3 March 2010 21:20, Tim Nelson tnel...@rockbochs.com wrote: Greetings All- I'm about to embark on some remote management testing and need a way to login to a remote system running CentOS 4.x/5.x via SSH, su to

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread John Kennedy
On Wednesday 03 March 2010 16:20:21 Tim Nelson wrote: Greetings All- I'm about to embark on some remote management testing and need a way to login to a remote system running CentOS 4.x/5.x via SSH, su to root (using a password), then execute a command. I currently login to the boxes

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread Benjamin Franz
Tim Nelson wrote: So, how am I able to remote login using SSH, su to root, then execute a command as root? You would probably be better off setting up forced-commands-only only login for root. and configuring the /root/.ssh/authorized_keys file with the command you want to execute. --

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread Tim Nelson
Tim Nelson Systems/Network Support Rockbochs Inc. (218)727-4332 x105 - Jeremy Rosengren jeremy.roseng...@gmail.com wrote: On Wed, Mar 3, 2010 at 3:36 PM, James Hogarth james.hoga...@gmail.com wrote: On 3 March 2010 21:20, Tim Nelson tnel...@rockbochs.com wrote:

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread nate
Tim Nelson wrote: YESS. It prevents the tty error from showing up and asks me for a password as expected. BUT, how do I then automate the entering of the password? John Kennedy mentioned using expect which I've used before but found it to be 'finnicky'. I may have to look at it again...

Re: [CentOS] SSH Remote Execution - su?

2010-03-03 Thread Chris Geldenhuis
Tim Nelson wrote: Tim Nelson Systems/Network Support Rockbochs Inc. (218)727-4332 x105 - Jeremy Rosengren jeremy.roseng...@gmail.com wrote: On Wed, Mar 3, 2010 at 3:36 PM, James Hogarth james.hoga...@gmail.com mailto:james.hoga...@gmail.com wrote: On 3 March 2010 21:20,