New to docker and have a switch that does not want to work

Thats correct. Try the command I posted and see if you get a bash-5.0# prompt

Ok, so it works from the terminal window within home assistant if I have protection off in the addon SSH & Web Terminal. If protection is on I get the long message in the window telling me that protection is on and I can’t access other containers. If I drop into the container shell in portainer it does not see the docker command.

Good, you are using portainer, so this makes it easier. Just issue the following command inside the container shell:

apk add sshpass

inside the home assistant container shell?

Yes. I actually had the same problem today and I just fixed it :slight_smile:

Ok, done. What next?

Now, try to ssh into your host fro mthe container shell:

sshpass -p 'your_host_password'  ssh your_host_username@your_host_ip_address

You need to put the password inside the quotes

The main Ubuntu shell is at 192.168.1.6:2222 and I get a dns error if I try to use the correct port number.

ok, try -p 2222 instead, like

ssh username@your_host_ip -p 2222

sshpass -p xxxx ssh [email protected] -p 2222

It gives me back the same prompt. I was trying 192.168.1.6:2222, way wrong. See above

Ok, might be a route or firewall issue. I am using the standard 21 port. Any chance you can change the ssh port to 22?

If you solve the port issue, all you need to do is to change your shell command as per below:

command_on: echo 'put your docker exec addon_40817795_nut upscmd command here inside quotes' | sshpass -p 'password' ssh username@ipaddress

and your shell command now gets executed on the host.

In order to be able to externally attach to the HA install, it wanted the addon wanted port 22. So, inorder to attach to the base os I set the base os on another port. This way I have ssh access to both.

I understand. Unfortunately, I am not good at network issues and this appears to be one

Also, I should be testing from the homeassistant container, not the supervisor container… correct? Still learning and have a ways to go.

I am a network engineer at a major university, but I am not a linux admin!

Ok, you are running hassio. I thought you were just running HA in a docker container. I am not using hassio, but if you get past the 2222 port issue, the rest should work fine.

I am out of time until Sunday, will keep at it. Maybe I can set the port on HA to the non-standard and leave the base os at standard.

Correct. I love Hassio on Home Assistant. Have been running that way for a couple of years on the pi.

Ok, good luck! I can confirm that the commands work after you get the port issue solved. I am also running a similar command, and after using the sshpass, I got everything working just fine.

I tried hassio and I really liked the addons etc, but I am using a lot of custom components I have made myself, and its easier with just the docker version for this reason.