Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107148

Hassio SSH to remote machine

$
0
0

@Phill_Healey wrote:

I need to send commands to a remote machine using SSH. I’ve installed the SSH add-on in Hassio (w/ supervisor) and from their generated a public key pair and pushed the key over to the remote server (see steps 1 -2: https://app.getpocket.com/read/1778265189). I can now commit commands to the remote server from the SSH web terminal without issue.

I’ve done the same as the pi/rasbian level, and again can send & execute commands on the remote server via the the local ssh terminal.

However, if I add these commands to my Hassio instance as shell_commands then run those commands via a button on the web-ui these fail with error code 250 or 255 showing in the Hassio log. This error relates to invalid permissions/credentials to run the ssh tasks on the remote server.

So, it would appear that Hassio is using a different user to perform shell_commands than the web terminal add-on and the pi@raspbian os level user. Which user is Hassio using to perform the shell_commands and how can I generate & push the public keys necessary to perform remote ssh actions?

Here’s an example of the type of shell command that I need to run on the remote server:

reboot_intercom_pi: ‘ssh pi@192.168.178.66 /usr/bin/sudo /sbin/shutdown -r now’

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 107148

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>