Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-13-2006, 05:44 AM   #1
Registered: Jun 2005
Posts: 374

Rep: Reputation: 30
Problem restarting service via ssh

I am trying to ssh into a server to fix it. When I ssh in I can restart the rsyncd dameon just fine via the command
/etc/init.d/rsyncd restart
But I am trying to do this from a central location via ssh in a script like so
ssh root@hostname "/etc/init.d/rsyncd restart"
 * Starting rsyncd ...@RSYNCD: 29

@ERROR: protocol startup error
                                                    [ !! ]
and this always fails!

I can't get this to work or even understand why it doesn't. There aren't a lot of env vars in the shell and the script uses only one which shouldn't matter at all if it's present or not (it's at the end of the line so if it's blank it's ok)

Can anybody help out on this?
Old 12-13-2006, 10:10 PM   #2
Registered: Aug 2003
Location: Indiana
Distribution: fc6 sles9 & 10 kubuntu ubuntu-server
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
Did you setup the authorized_keys file on the receiving box and put the pub key in from the sending box so that a password is not requested?
Old 12-14-2006, 03:02 AM   #3
Registered: Jan 2006
Location: Chennai, Tamil nadu, India
Distribution: Debian Etch Testing
Posts: 117

Rep: Reputation: 16
setup passwordless ssh.
Old 12-14-2006, 04:54 AM   #4
Registered: Jun 2005
Posts: 374

Original Poster
Rep: Reputation: 30
I already use ssh keys, this is how I am connecting to the box.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Restarting DNS Service in Slackware jademan83 Linux - Networking 2 11-07-2015 09:27 AM
Restarting samba service dahoule Linux - Networking 13 12-11-2012 11:17 AM
ssh name or service not known? gonzojd7 Linux - Networking 11 09-08-2006 11:17 PM
Starting and Restarting the Apache service. johann519 Fedora 6 02-05-2004 11:00 PM
SSH-Want to see program output without restarting it. Facekhan Linux - Newbie 4 05-05-2003 02:11 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:22 AM.

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