LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-13-2006, 05:44 AM   #1
humbletech99
Member
 
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
Code:
/etc/init.d/rsyncd restart
But I am trying to do this from a central location via ssh in a script like so
Code:
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
xjlittle
Member
 
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
tshrinivasan
Member
 
Registered: Jan 2006
Location: Chennai, Tamil nadu, India
Distribution: Debian Etch Testing
Posts: 117

Rep: Reputation: 16
setup passwordless ssh.

http://hacks.oreilly.com/pub/h/66
http://gentoo-wiki.com/SECURITY_SSH_without_a_password
 
Old 12-14-2006, 04:54 AM   #4
humbletech99
Member
 
Registered: Jun 2005
Posts: 374

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


Reply


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 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
Restarting DNS Service in Slackware jademan83 Linux - Networking 1 05-27-2005 08:25 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


All times are GMT -5. The time now is 01:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration