[mythtv-users] Restarting the backend from the frontend

Ma Begaj derliebegott at gmail.com
Fri Nov 2 18:30:54 UTC 2007

> process from the frontend computer (seperate back & frontends).  But I
> couldn't figure out a secure way to run a script as root through ssh and I
> gave up.  Both my back and frontends run ubuntu so there is no dedicated
> root account.  It would probably be easier if you have a dedicated root
> account.

What's the big deal about it? What did not work? I am using more or
less the same way to mount samba drives.

on frontend:
make a ssh key with ssh-keygen. you will find two new files in ~/.ssh/
folder: id_dsa (private key) and id_dsa.pub  (or id_rsa and
id_rsa.pub, depending on key type).
copy id_dsa.pub to you mythbackend with "scp id_dsa.pub
mythbackend_address@/home/mythtv/.ssh/authorized_keys" if
authorized_keys does not exist. if it exists, copy the key and append
it to authorized_keys with ">>".

try logging in over ssh. it will not ask you for a password.

on mythbackend:
make a shell script which restarts mythbackend and call it i.e.

run this command from mythfrontend to test:
ssh mythtv at mythbackend_address /home/mythtv/mythbackend_restart

if it works, add either an irexec command in .lircrc:

    prog = irexec
    button = Power
    config = /home/your_user/restart_remote_mythbackend

restart_remote_mythbackend should contain this:
ssh mythtv at mythbackend_address /home/mythtv/mythbackend_restart

or add a button in your mythfrontend menu
(/usr/share/mythtv/mainmenu.xml if you want to put it in the main
     <text>Restart MythBackend</text>
     <action>EXEC /home/your_user/restart_remote_mythbackend</action>


More information about the mythtv-users mailing list