AlexxIT / SSHCommand

Run any SSH command on remote server from Home Assistant service call
https://github.com/AlexxIT/Blog
MIT License
89 stars 7 forks source link

ENV variables? #23

Open rgsaura opened 5 months ago

rgsaura commented 5 months ago

Hi! I'm having trouble executing commands. They need the full path of the executable and this causes some bash scripts to not work at all.

Please consider a solution to solve this 🙏🏼

AlexxIT commented 5 months ago

It's just SSH client. You should have right settings for your SSH user.

rgsaura commented 5 months ago

I'll just give you my experience and you can guess whats going on... 😅

I try both from HA, but the ssh_command. exec_command doesnt work because a program it's not found by ENV... That's my guess, what do you think? All ideas are welcomed!

Thanks for the response

Screenshot 2024-04-24 at 12 50 35 Screenshot 2024-04-24 at 12 51 19 Screenshot 2024-04-24 at 12 52 08

sigmaenigma commented 1 month ago

I'll just give you my experience and you can guess whats going on... 😅

I try both from HA, but the ssh_command. exec_command doesnt work because a program it's not found by ENV... That's my guess, what do you think? All ideas are welcomed!

Thanks for the response

Screenshot 2024-04-24 at 12 50 35 Screenshot 2024-04-24 at 12 51 19 Screenshot 2024-04-24 at 12 52 08

What does line 20 and 25 have in your message.sh script? Do you have something like "#!/usr/bin/env bash" in the first line of your sh script?