Run docker exec from shell_command integration or other tricks

Hi everybody,
to be able to run a docker command by pressing a button o turning on/off a switch I used to run hassio.addon_stdin service but since I update to the last version of the addon the support for stdin has been removed. I tried to use the shell_command integration but as I expected the docker exec command is not found and the script that I run end with the exit code 127. I know that the shell_command will run inside the homeassistant docker of my installation. Is there anybody that can explain to me how to get the same result in another way? maybe ssh into the a0d7b954_ssh docker and then run the command?
thank you to anybody will try to help me…

What exactly is it you’re trying to accomplish? Maybe there’s an easier way than using SSH.

Hi, I have to run some docker command with the “docker exec” over the dockers running in my home assistant installation.
Actually I’m running command over a docker image that I created ad hoc for retreiving data from the IPMI interfaces and send ipmitool command to those interfaces and to silence the UPS beeper (I’ve installed the nut addon)
I used to do this task by calling a service hassio.addon_stdin over the a0d7b954-ssh. It worked flawlessly for months unitl I decided to update the ssh addon without noticing that the support for the addon_stdin has been removed (it was clearly stated so that’s my fault).
Now I’m stuck because the shell_command integration run those commands in the homeassistant container and will not recognize any docker command (as expected)… I’m trying to revert the ssh version to the 9.1.1 by modifing the data inside the backup file I’ve made with no success to be honest…

Have you tried setting up command_line entities or shell_commands?
You should be able to run SSH commands within HA which will connect to the SSH addon, seems like you need to do some trickery to get the authentication to work, but something like this might do it:

Yes, I’ve already tried something like that but I’m not able to ssh into the homeassistant host itself…
I’ve tried to ssh into [email protected] but it keeps asking me the password
I’ve tried to ssh into root@ a0d7b954-ssh but it didn’t resolve the host name
The keys setup seem to be correct… as far as I know. I’ve putted the public key in the autorized-keys of the ssh addon configuration but when I try to run the command ssh -i /path/to/priv.key root@… it keeps asking for the password

I miraculously managed to retreive an old back up and I’ve restored only the ssh addon… so now it is working again, but it will be good to find out another solution just in case