🆕[add-on] HassOS SSH port 22222 Configurator

I love the idea of this add-on. I followed the official HA developer guide to create a public/private key but couldn’t get it to work. Then installed this add-on, but still no luck. When trying to ssh to port 22222 I’m getting error “Connection refused”.

This is what the logs of the add on show:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
no vda1 config found
no sda1 config found
no sdb1 config found
no mmcblk0p1 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’m running HA on an Odroid N2+. Any suggestions on how to troubleshoot/fix?

What are your disk mounts?

[core-ssh mnt]$ df -aTh
Filesystem           Type            Size      Used Available Use% Mounted on
overlay              overlay        56.6G      9.5G     44.8G  18% /
proc                 proc               0         0         0   0% /proc
sysfs                sysfs              0         0         0   0% /sys
tmpfs                tmpfs           1.9G         0      1.9G   0% /sys/fs/cgroup
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/systemd
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/cpuset
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/net_cls,net_prio
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/blkio
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/pids
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/devices
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/perf_event
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/freezer
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/hugetlb
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/memory
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/cpu,cpuacct
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /data
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /share
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /ssl
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /addons
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /backup
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /media
devtmpfs             devtmpfs        1.7G         0      1.7G   0% /dev
tmpfs                tmpfs           1.9G         0      1.9G   0% /dev/shm
devpts               devpts             0         0         0   0% /dev/pts
hugetlbfs            hugetlbfs          0         0         0   0% /dev/hugepages
mqueue               mqueue             0         0         0   0% /dev/mqueue
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /config
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /run/audio
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /etc/asound.conf
tmpfs                tmpfs         763.5M      1.4M    762.1M   0% /run/dbus
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /etc/hosts
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /etc/resolv.conf
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /etc/hostname
tmpfs                tmpfs           1.9G         0      1.9G   0% /dev/shm
/dev/mmcblk1p4       ext4           56.6G      9.5G     44.8G  18% /etc/pulse/client.conf
proc                 proc               0         0         0   0% /proc/bus
proc                 proc               0         0         0   0% /proc/fs
proc                 proc               0         0         0   0% /proc/irq
proc                 proc               0         0         0   0% /proc/sys
proc                 proc               0         0         0   0% /proc/sysrq-trigger
tmpfs                tmpfs           1.9G         0      1.9G   0% /proc/asound
devtmpfs             devtmpfs        1.7G         0      1.7G   0% /proc/keys
devtmpfs             devtmpfs        1.7G         0      1.7G   0% /proc/timer_list
tmpfs                tmpfs           1.9G         0      1.9G   0% /sys/firmware

I suggest an issue on the author’s github.

Thanks. Done.

1 Like

Hello @marcvl64

i have got the same problem like you,

i follow the doc…but in the HassOs22222 AddOn i put the wrong key.

In config/.ssl/ you have the id_rsa.pub and this is the key you need to paste in the “configuration” part of this AddOn. this key finish by “root@a0d7b954-ssh”.

I have the ssh and web terminal AddOn from @frenck and its not the same key, its end with “rsa-key-20190824”

i think the key for HassOs AddOn need to be create by root user, i follow this link if i remember well…https://help.github.com/articles/connecting-to-github-with-ssh/

hope it helps

No, @marcvl64’s problem is fixed.

Nice for him :smile:

Hi,

Hope someone can help. Not clued up on SSH but needing to get this working for full Samba-nas addon support (medialibrary).
Constantly getting pop up via Putty and terminal app -

" No supported authentication methods available (server sent: public key)"

my log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
no vda1 config found
no sda1 config found
no sdb1 config found
no mmcblk0p1 config found
no mmcblk1p1 config found
already added this key to nvme0n1p1
This Configurator did it's job. Perform a hard-power-off now. This configurator only works once and is no longer needed.

Is it because public key is being added to nvme0n1p1 ?

Disk mounts:

➜  ~ df -aTh
Filesystem           Type            Size      Used Available Use% Mounted on
overlay              overlay       234.0G     10.6G    213.8G   5% /
proc                 proc               0         0         0   0% /proc
sysfs                sysfs              0         0         0   0% /sys
tmpfs                tmpfs           3.8G         0      3.8G   0% /sys/fs/cgroup
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/systemd
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/cpu,cpuacct
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/hugetlb
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/perf_event
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/cpuset
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/memory
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/freezer
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/net_cls,net_prio
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/pids
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/blkio
cgroup               cgroup             0         0         0   0% /sys/fs/cgroup/devices
/dev/root            squashfs      178.1M    178.1M         0 100% /sbin/docker-init
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /config
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /share
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /backup
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /addons
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /data
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /ssl
devtmpfs             devtmpfs        3.8G         0      3.8G   0% /dev
tmpfs                tmpfs           3.8G         0      3.8G   0% /dev/shm
devpts               devpts             0         0         0   0% /dev/pts
hugetlbfs            hugetlbfs          0         0         0   0% /dev/hugepages
mqueue               mqueue             0         0         0   0% /dev/mqueue
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /media
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /run/audio
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /etc/asound.conf
tmpfs                tmpfs           1.5G      1.4M      1.5G   0% /run/dbus
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /etc/hosts
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /etc/hostname
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /etc/resolv.conf
tmpfs                tmpfs           3.8G         0      3.8G   0% /dev/shm
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /etc/pulse/client.conf
/dev/nvme0n1p8       ext4          234.0G     10.6G    213.8G   5% /var/log/journal
tmpfs                tmpfs           1.5G      1.4M      1.5G   0% /run/log/journal
proc                 proc               0         0         0   0% /proc/bus
proc                 proc               0         0         0   0% /proc/fs
proc                 proc               0         0         0   0% /proc/irq
proc                 proc               0         0         0   0% /proc/sys
proc                 proc               0         0         0   0% /proc/sysrq-trigger
tmpfs                tmpfs           3.8G         0      3.8G   0% /proc/asound
tmpfs                tmpfs           3.8G         0      3.8G   0% /proc/acpi
devtmpfs             devtmpfs        3.8G         0      3.8G   0% /proc/kcore
devtmpfs             devtmpfs        3.8G         0      3.8G   0% /proc/keys
devtmpfs             devtmpfs        3.8G         0      3.8G   0% /proc/timer_list
tmpfs                tmpfs           3.8G         0      3.8G   0% /proc/scsi
tmpfs                tmpfs           3.8G         0      3.8G   0% /sys/firmware

I’m running HassOS on a x86 platform. Rebooted Host twice after SSH addon start and configure.
Hope its a easy resolve?! LoL

As you don’t have nvme0n1p1 mounted, I would guess so. Post an issue to the author’s github.

Ok, Thank you.

Hi!

I’m trying to get this addon working to run SambaNas addon with an external USB but i can’t get it working :frowning:

This is the log when I run this addon:

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.
no vda1 config found
no sda1 config found
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’m running Home Assistant OS 7.0 in a rpi4 and I have tried this addon and also using a USB with an authorized_keys file. I also use the SSH & web terminal Addon to enter HA. With that terminal I have seen that in /root/.ssh/ folder there is only a file called known_hosts with a public? key for port 22222 but that key is not the one I have generated. I think a file called id_rsa is supossed to be found also in that directory.

In addition, in SambaNas plugin logs I can read:

Warning: Permanently added ‘[192.168.1.4]:22222’ (ECDSA) to the list of known hosts.
Load key “/root/.ssh/id_rsa”: invalid format
[email protected]: Permission denied (publickey).

What am I doing wrong? Any help would be appreciated!

What is the sambanas addon.

Hi

It is a Samba add-on with support for external drives: [New Addon] Samba NAS. (Mount external disk and share it ) - Share your Projects! - Home Assistant Community (home-assistant.io)

It needs access to port 22222 in order to mount the external drive in media folder so other add-ons can access the drive (like plex server add-on).

Just wanted to say THANK YOU @adamoutler1 for this (and for the I2C configurator)! I spent a couple of hours trying to understand the convoluted, poorly documented process from HA maintainers, and I ended up being able to access via ssh, but only with the USB card inserted! I find it completely unbelievable that it is faster to install a UI plugin than to execute a couple of commands (used linux for 20 years), because in their infinite wisdom they decided to make an “easy” process based on a USB card and without any feedback or logging. Good job, but horrible experience with HA maintainers.

Anyone, please?

Post an issue on the author’s github.

Done and solved. Protected mode must be disabled! I haven’t found that in the documentation :confused:

Anyone knows a way to check that the authorized keys has been created? I have SSHd with SSH & Web terminal but there is nothing in /root/.ssh

1 Like

I’m running hassio.ova on ESXi and am logging into the supervisor using the Terminal Add-On with a password. I copied the contents of authorized_keys and ran this configurator but Putty seems to want a private key. Is a private-public key pair the only authentication method supported?

Also, although the Configurator log showed success installing on /dev/sda1, the console says

/dev/sda1: Can't open blockdev