Home Assistant Community Add-on: SSH & Web Terminal

Not if you’re running HA OS - there is only a limited debug ssh by default.

1 Like

Hi, here is how to enable the host ssh on port 22222 of home assistant. I’ve never managed to make it work but the option exists. https://developers.home-assistant.io/docs/operating-system/debugging/

Edit : an alternative is this addon here [Add-on] HassOS SSH port 22222 Configurator

Thanks @ alexbelgium , I’ll give a try

Finally I am moving towards HA supervised as per my signature

My config file looks identical to yours, except my key, and it is rejected. If I change and put in a password it works. I’m sure I am doing something wrong with the pair created with puttygen. I thought it would be easier to find out what with the community add on rather than the ssh troubleshootiing using 22222 . Is there any settings in putty gen that I maybe missing? I am using RSA and 2048 which I believe is the default.
Thanks.
Just found the issue. You also need to edit the private file and convert it to Linux from windows.

Hi, a user created an addon to make the process much easier here : [Add-on] HassOS SSH port 22222 Configurator

1 Like

I can not start the addon anymore; gives me Invalid list for authorized_keys. I opened up my private key with puttygen and it’s the same one, and I didn’t move the file location on my windows PC. I am unable to edit the add-on configuration. For example, changing the username from hassio to homeassistant gave this error:

Failed to save addon configuration, not a valid value for dictionary value @ data[‘options’]. Got {‘ssh’: {‘username’: ‘homeassistant’, ‘password’: ‘’, ‘authorized_keys’:
‘ssh-rsa
redacted
rsa-key-20200621’, ‘sftp’: False, 'compati…

Also to note, I can no longer SSH with putty either. Here’s my config

My auth keys is a secret and looks like this:

authorized_keys:
  - secret! Etc

My other settings are similar to yours. Your key may need to be in quotes as well?

1 Like

Thanks for the reply, David! I just tried to put the key – everything after ssh-rsa, and everything before rsa-key-20200621 – in quotes, both single and double, but got this error:

BlockquoteFailed to save addon configuration, not a valid value for dictionary value @ data[‘options’]. Got {‘ssh’: {‘username’: ‘hassio’, ‘password’: ‘’, ‘authorized_keys’: ‘ssh-rsa redacted rsa-key-20200621’, ‘sftp’: False, 'compatibility_…

authorized_keys:
  - ssh-rsa AAAAB3Nz

Just checked my secrets. It would be all one line and not multi line as well.

1 Like

That fixed it! You are the man!!!

1 Like

TL;DR,

Sorry for my ignorance but is there a way to access the addons folder so I can read other addon’s settings?

Edit: It turns out that the addon mounts /mnt/data/supervisor/addons/local so it doesn’t expose the whole addons folder :confused:.

Just did a clean supervised install of HA 2021.2.3 on latest armbian and the SSH&Web Terminal add-on isn’t in the add-on store list. I’m really only looking for the Web Terminal capability. Any idea why this add-on wouldn’t be in the list and how to fix the issue?

Both SSH add-ons in the store have a web terminal and you need to have advanced mode enabled for your user to see those add-ons, along with some others.

Thanks. That was it.

Running HA Supervised supported/healthy. I am attempting the following in an automation:

- id: drups beeper off
  alias: "DRUPS beeper off"
  trigger:
    platform: state
    entity_id: input_boolean.drups_beeper
    to: "Off"
  action:
    service: hassio.addon_stdin
    data:
      addon: a0d7b954_ssh
#      input: "/config/sudo docker exec addon_a0d7b954_nut upscmd -u admin -p xxxx DR_UPS beeper.enable"
      input: "/config/boff.sh"

I have tried both actions, neither works nothing logged in home-assistant.log or in the SSH log with level set to debug. I have logbook entries for the automations triggering (both on and off).

I can run either from the ssh shell and both work well. The script files just contain the sudo line.

What am I not understanding correctly? The beeper test is a basic test that does not change the ups state, not the intended long term target command. I have also tried the full container name of addon_a0d7b954_ssh.

try using
to: off
instead, all lowercase

Tried it with an error:

2021-03-02 15:06:44 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected str for dictionary value @ data['to']. Got None. (See ?, line ?).

Either ’ ’ or " " seem to be required.

Sorry, should be
to: ‘off’

In a pure python hass core, I am pretty sure you have already SSH enabled. So you just need to setup the WebTerminal aka ttyd and add to home assistant as a new panel iframe