Shell Script in Automation

I have a shell script that works when run from the command line but I can’t get it to work in an automation.

alias: ProxmoxSSL
description: ""
  - platform: time
    at: "02:00:00"
condition: []
  - service: shell_command.proxmox
    data: {}
mode: single


  proxmox: '/ssl/'

Any ideas?

Your ssh terminal output above, how did you ssh to get that? It appears you are in the OS filesystem and you need to define the ssh private key in the home assistant docker file system. The warning you posted seems to support that you don’t have the keys in the docker file system.

Have you followed this guide SSH'ing from a command line sensor or shell command

I used the Home Assistant Terminal.

I just switched to using Proxmox and HAOS after a couple of years of using Debian Supervised. I can’t see where Docker is even being used now

HAOS installs Home Assistant and any Add-ons in docker containers. That makes it convenient to upgrade by simply pulling the new docker container from Github.

By “Home Assistant Terminal” I assume you mean the Home Assistant VM in Proxmox. That is not the right location. Follow the guide I posted above; it has all the information needed to correctly setup the correct shell and command line entities.

BTW, if you want to see it, just open your Proxmox host, select your HAOS VM, and then select >_ Console. You get:

From there type login, then enter docker ps

There are your docker containers.

This is what I didn’t know:

After storing the key elsewhere, it works now. Thanks for your help!

1 Like