LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 02-14-2007, 10:53 PM   #1
seefor
Member
 
Registered: Mar 2006
Posts: 34

Rep: Reputation: 15
Question Remotely restarting a service




I have two Linux boxes running FreeRadius.
I have a script that copies the user file from sif-raddb-1 to sif-raddb-2:
Code:
scp /etc/raddb/users root@sif-raddb-2:/etc/raddb/
Now I would like restart the service on sif-raddb-2 and not sure where to start. I did how ever tried telnet(lol).
The service I need to restart is radiusd

Thanks in advance

Last edited by seefor; 02-14-2007 at 11:04 PM.
 
Old 02-14-2007, 11:38 PM   #2
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
Quote:
restart the service on sif-raddb-2 and not sure where to start. I need to restart is radiusd
Just do the following,

root@sif-raddb-1:~#ssh root@sif-raddb-2 /etc/init.d/radiusd restart

But before that just remember to copy your public key to the machine if-raddb-2 so that when you do ssh through the script it will not ask or wait for the password. Check this for doing ssh with no pasword,

http://www.astro.caltech.edu/~mbonat...sword_ssh.html

--
Prasanta

Last edited by prasanta; 02-15-2007 at 12:42 AM.
 
Old 02-14-2007, 11:52 PM   #3
seefor
Member
 
Registered: Mar 2006
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks mate,

I was just about to post what I found (almost like yours) :

scp /etc/raddb/users root@sif-raddb-2:/etc/raddb/
ssh root@sif-raddb-2 'exec service radiusd restart'

but it prompts me for a password.

How can I get around that hehe
 
Old 02-15-2007, 12:52 AM   #4
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
Just look at the link that I posted for ssh with no password.

--
Prasanta
 
  


Reply

Tags
services


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
restarting network service in windows nick021 Linux - General 1 12-16-2006 04:20 AM
Problem restarting service via ssh humbletech99 Linux - Networking 3 12-14-2006 04:54 AM
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


All times are GMT -5. The time now is 08:56 AM.

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