🆕[add-on] HassOS SSH port 22222 Configurator

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

Should be in the documentation.
Great addon after fighting for hours with usb sticks, ansi encoding and so on :frowning:

hi, can you help me with this issue too?
I have my protection mode deactivated, but it seems the same as your issue

So what are you having problems with? Installing sambanas? Using the addon to enable ssh on port 22222?

yes, i always show this information, but via SSh I can connect to photo_2022-04-07_01-57-12

Have you run the ssh port 22222 configurator?

Are you able to access home assistant via ssh to port 22222 on another computer?

Have you put the the RSA private key in your sambanas settings?

Google for the correct key format. I know Debian changed the requirement a while ago and I had to remake my key (actually I just saved it in a different format) This is likely the issue given your error

thank you!!!

now I can sleep in peace, 3 days trying to fix this, and you saved me!
I had to edit the configuration of samba nas addon to use this form:

  ssh_private_key: |
   -----BEGIN RSA PRIVATE KEY-----
   *your key with the correct YAML identation here*
   -----END RSA PRIVATE KEY-----

THANK YOU
the amount of 3rd party hacks needed to get basic features enabled is proving to be BS

1 Like