🆕[add-on] HassOS SSH port 22222 Configurator

Will this not work on x86 HAOS?

I hoped I could use it to mount a NAS samba share for some addons.

It should

"arch": ["amd64", "i386", "armhf", "armv7", "aarch64"],

Thanks, I missed that, except it says it worked but doesn’t. Needs more investigation by me.

We’re discussing better instructions here. If you figure it out soon, feel free to mention what helps here. Replace the default pubkey with a clearly bogus key by SharkWipf · Pull Request #29 · adamoutler/HassOSConfigurator · GitHub

See my comment with 4 numbered items for common problems we hope to reduce.

We are moving to Tasmania permanently next week, so no action from me for several weeks.
The bay is 30 metres from the front gate and it is a year round dog beach. The boys (pointers) will go nuts.

So i did a workaroundm i could not use Configurator with mac, just the keys did not match, but i got access to HOST os using portainer
You just need to install portainer as addon in homeassistant, then add a new container with the following options and you have the command line to host, you can update or rm docker, make prune etc
heres how to make a container to do that in docker

1 Like

You can always transform the key or generate a new one. What was the key type? What did it start with?

well i made a key using Puttygen and used it after on my mac
using key generated on my mac didnt work for some reason, i used several tutorials and official docs to do that
all worked well, but it surely took some time to do that, had issues afterward using that ssh key to mount nas samba drive for frigate and got errors of Too open key, could not chmod that key because the file system is read only.

Would you have found it useful if there was an additional switch in settings:

Disregard the above, generate a new key and print it in the logs.

This would go below the existing SSHKey box
image
As seen in this picture of my Active Cooling addon.

I’m trying to figure out how to make this process easier.

Hello there - wanted to edit config.txt on my Home Assistant Yellow - seemed like your addon should do the trick. But I cannot get to install it. I get whole list errors:

23-03-31 14:44:13 WARNING (SyncWorker_0) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of DeskPi Pro Active Cooling
23-03-31 14:44:13 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 185, in block_bad_requests
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 201, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 268, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 280, in core_proxy
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/store.py", line 178, in store_info
    ATTR_ADDONS: [
  File "/usr/src/supervisor/supervisor/api/store.py", line 179, in <listcomp>
    self._generate_addon_information(self.sys_addons.store[addon])
  File "/usr/src/supervisor/supervisor/api/store.py", line 114, in _generate_addon_information
    ATTR_ADVANCED: addon.advanced,
  File "/usr/src/supervisor/supervisor/addons/model.py", line 227, in advanced
    return self.data[ATTR_ADVANCED]
  File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data
    return self.sys_store.data.addons[self.slug]
KeyError: 'a0d7b954_grocy'
23-03-31 14:44:13 WARNING (SyncWorker_3) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of DeskPi Pro Active Cooling
23-03-31 14:44:13 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 185, in block_bad_requests
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 201, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 268, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 280, in core_proxy
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/store.py", line 178, in store_info
    ATTR_ADDONS: [
  File "/usr/src/supervisor/supervisor/api/store.py", line 179, in <listcomp>
    self._generate_addon_information(self.sys_addons.store[addon])
  File "/usr/src/supervisor/supervisor/api/store.py", line 114, in _generate_addon_information
    ATTR_ADVANCED: addon.advanced,
  File "/usr/src/supervisor/supervisor/addons/model.py", line 227, in advanced
    return self.data[ATTR_ADVANCED]
  File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data
    return self.sys_store.data.addons[self.slug]
KeyError: 'a0d7b954_emqx'

Not sure how to fix that… In the UI it only says: Failed to install addon - unknown error

Disable protection mode.

Hello @adamoutler ,

can i use you add-on with Virtualbox haos_ova-9.5.vdi.zip ?

My problem: - ssh connection - haos_ova-9.5.vdi -

Thank’s, i have solved my problem.

The instructions for this are not clear.

Use ssh-keygen to create your key

paste the key into the config tab and save.

Disable protection mode

start the addon and then reboot twice (im running a VM in proxmox)?

Then enter ssh [email protected] -p22222 into the HA SSH addon?

I get; ssh: connect to host 127.0.0.1 port 22222: Connection refused

Do I restart it after the reboot?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
no vda1 config found
creating authorized keys in sda1 !
no sdb1 config found
no mmcblk0p1 config found
no mmcblk1p1 config found
no nvme0n1p1 config found
This Configurator did it's job. Perform a hard-power-off now. This configurator only works once and is no longer needed.

I Just did it all again and get the same error.

Can I use the SSH HA addon?

It should work. Did you power off the VM?

I was rebooting the VM though proxmox. I just went though it again

ssh-keygen to create your key form within the SSH HA addon?

paste the key.pub (I named it key when asked) into the config tab and save.

image

That’s how it looks after saving.

protection mode disabled

start the addon, then shutdown the VM in the Poxmox console

Start the VM

Using the SSH addon for HA enter;

[core-ssh ~]$ ssh -vv  [email protected] -p22222
OpenSSH_9.0p1, OpenSSL 1.1.1q  5 Jul 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 127.0.0.1 is address
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22222.
debug1: connect to address 127.0.0.1 port 22222: Connection refused
ssh: connect to host 127.0.0.1 port 22222: Connection refused
[core-ssh ~]$ ls
addons  backup  config  share   ssl
[core-ssh ~]$ 

Also the key and key.pub disappears after a restart?

This is untested with VM. Have you tried other options?

Thanks for trying to help I appreciate it.

Its just so frustrating when HA are breaking things all the time that are NOT in breaking changes, then we are just expected to wait a month or two before they PR the fix because we cant edit the code of an open source platform.

Anyway, thanks for trying to help. I appreciate it

Are you trying to edit the code of an integration? You don’t need this to do that.

It is off topic, so start a new thread and tag me in.

1 Like
6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
no vda1 config found
creating authorized keys in sda1 !
no sdb1 config found
no mmcblk0p1 config found
no mmcblk1p1 config found
no nvme0n1p1 config found
This Configurator did it's job. Perform a hard-power-off now. This configurator only works once and is no longer needed.

this is my log but I can’t access port 22222

Try with a different key