LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Running rc scripts remotely doesn't work (https://www.linuxquestions.org/questions/linux-software-2/running-rc-scripts-remotely-doesnt-work-823110/)

dbsanders 07-30-2010 03:28 PM

Running rc scripts remotely doesn't work
 
RHEL 5 update 2

I'm trying to start services from a centralized location on many servers. I can start/stop these services from an interactive login without any issue, but when I try the same command via ssh/rsh, it hangs. I have my ssh keys set up correctly and I can run other remote commands.

Local server:
# /etc/init.d/samba start
Starting Samba smbd: [ OK ]

Remotely to same server:
# ssh server "/etc/init.d/samba start"
Starting Samba smbd:
<hang>

rayfordj 07-31-2010 07:16 AM

Does it work if you use nohup?
# ssh server "nohup /etc/init.d/samba start"

michaelk 07-31-2010 08:08 AM

Are you logged in as root?
What other remote commands are you running successfully?

dbsanders 08-02-2010 06:30 PM

ssh -t solved the issue
 
Was requiring an ANSI terminal for the output, and wasn't getting it. Adding -t did the trick.


All times are GMT -5. The time now is 09:38 PM.