LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-30-2010, 03:28 PM   #1
dbsanders
LQ Newbie
 
Registered: Jul 2010
Posts: 4

Rep: Reputation: 3
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>
 
Old 07-31-2010, 07:16 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
Does it work if you use nohup?
# ssh server "nohup /etc/init.d/samba start"
 
Old 07-31-2010, 08:08 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,750

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Are you logged in as root?
What other remote commands are you running successfully?
 
Old 08-02-2010, 06:30 PM   #4
dbsanders
LQ Newbie
 
Registered: Jul 2010
Posts: 4

Original Poster
Rep: Reputation: 3
ssh -t solved the issue

Was requiring an ANSI terminal for the output, and wasn't getting it. Adding -t did the trick.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing commands remotely using scripts imagine_me2 Linux - Newbie 10 07-09-2010 12:09 PM
is suid disabled from running all scripts or just from running them as root monsteriname Programming 2 09-05-2009 02:57 AM
Running X Application remotely arivupp Linux - General 3 05-08-2009 07:25 AM
Running X-WINDOW remotely consistgd Linux - Software 8 11-12-2004 04:45 AM
remotely running X apps JustinHoMi Linux - Networking 1 04-30-2001 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration