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:
The service I need to restart is radiusd
Thanks in advance
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,
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 :scratch: :scratch:
Just look at the link that I posted for ssh with no password.
|All times are GMT -5. The time now is 04:31 PM.|