Mailing List Archive

SSH from the Backend
I am trying to issue a command from the master to the slave backend
using ssh.

Something like "ssh 'pi@192.168.0.127' 'sudo pistop.sh'"

It works from the user account but not when called from the master
backend presumably because it runs under account 'mythtv'.

How do I give the 'mythtv' account ssh credentials?

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: SSH from the Backend [ In reply to ]
On 10/25/20 6:56 AM, John wrote:
> I am trying to issue a command from the master to the slave backend
> using ssh.
>
> Something like "ssh 'pi@192.168.0.127' 'sudo pistop.sh'"
>
> It works from the user account but not when called from the master
> backend presumably because it runs under account 'mythtv'.
>
> How do I give the 'mythtv' account ssh credentials?
>
I just make sure 'mythtv' user has a password and is set for bash shell.

the entry in /etc/passwd reads as:

mythtv:x:127:138::/home/mythtv:/bin/bash

your user and group numbers may differ.

use passwd to assign a password

Jim A



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: SSH from the Backend [ In reply to ]
On Sun, Oct 25, 2020, at 06:56, John wrote:
> I am trying to issue a command from the master to the slave backend
> using ssh.
>
> Something like "ssh 'pi@192.168.0.127' 'sudo pistop.sh'"
>
> It works from the user account but not when called from the master
> backend presumably because it runs under account 'mythtv'.
>
> How do I give the 'mythtv' account ssh credentials?

This seems like the perfect place for a passphraseless SSH key with a forced command (the latter being addressed at the end of this document):

https://help.ubuntu.com/community/SSH/OpenSSH/Keys

--
Ryan Novosielski
ryan@novosielski.com
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: SSH from the Backend [ In reply to ]
On 25/10/2020 11:03, Jim Abernathy wrote:
>
> On 10/25/20 6:56 AM, John wrote:
>> I am trying to issue a command from the master to the slave backend
>> using ssh.
>>
>> Something like "ssh 'pi@192.168.0.127' 'sudo pistop.sh'"
>>
>> It works from the user account but not when called from the master
>> backend presumably because it runs under account 'mythtv'.
>>
>> How do I give the 'mythtv' account ssh credentials?
>>
> I just make sure 'mythtv' user has a password and is set for bash shell.
>
> the entry in /etc/passwd reads as:
>
> mythtv:x:127:138::/home/mythtv:/bin/bash
>
> your user and group numbers may differ.
>
> use passwd to assign a password
>
> Jim A
>
>
Thanks worked great


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org