๐Ÿ†•[add-on] HassOS SSH port 22222 Configurator

Tags: #<Tag:0x00007f327029f168> #<Tag:0x00007f327029ef38>

Thanks, but itโ€™s missing most of the devices. If you donโ€™t feel comfortable posting all that text here, you can dump it into pastebin.adamoutler.com, hit ctrl+s then copy the resulting link in here. I need to see the devices so I know what to target. Basically, I need to see the entire result of ls /dev

1 Like

Ok. I see you have an mmc device partitioned into boot and data sections. I am familiar with this setup from development boards I have used. I believe it should be the same setup as on a normal HassOS. Iโ€™m not sure how it uses the partitions though. So Iโ€™m going to have you run some more commands to determine how that emmc is laid out.

Letโ€™s see the eMMC structure by installing and running parted print. Parted will go away after a reboot or restarting the shell container so no need to uninstall.

apk add parted
parted /dev/mmcblk0 print

Weโ€™re looking for the Hass Boot partition as seen here.

Just to be sure, so we reduce the back-and-fourth, I want to inspect the partitions as well. Letโ€™s mount all the potential partitions and then the next most likely partitions, then check the filesystems to determine where we need to place the files.

mkdir /tmp/b0 /tmp/b1 /tmp/1 /tmp/2
mount /dev/mmcblk0boot0 /tmp/b0
mount /dev/mmcblk0boot1 /tmp/b1
mount /dev/mmcblk0p1 /tmp/1
mount /dev/mmcblk0p2/tmp/2
ls -alR /tmp

I expect the last command to be quite lengthy so please use a pastebin. Errors in mounting are to be expected.

Just back to the Hassos on virtualbox on amd64 case, what info do you want?

1 Like

Can you do the same I asked of nappyjim? Starting with ls /dev above. After that if you have an sda1, get the parted /dev/sda print for me then mount sda1/sda2on tmp instead of mmcblk0p1/mmcblk0p2 and ls -alR

Do you need me to type it out in full? I can do it tomorrow at my computer, but not mobile.

Your device will be sda, sda1, and sda2 instead of mmcblk0, mmcblk0p1, and mmcblk0p2

I think I can do it, but its almost bedtime, so Iโ€™ll do it at a later time.

@adamoutler Plugged monitor into my HA blue and when I restart your add-on and check log, it says everything is good. But on the monitor, this pops up

/dev/sda1: Cant open blockdev
/dev/mmcblk0p1: Cant open blockdev

I will try the other things you asked

@adamoutler so below for results of your requests.

image

image

can you do this command again?
image
Looks like you added a tilde โ€œ~โ€ at the end of that line and caused it to fail.

so

mkdir /tmp/1
mount /dev/mmcblk0p1 /tmp/1
ls -alr /tmp/1

HassOS says this Addon gets a security rating of 6

I did some research to figure out how the security ratings are applied and was able to game the system :smiley:

@adamoutler
image

Thanks! You should be supported with v0.3.

when can we expect 0.3?

Itโ€™s available now.


You might need to use the reload button in the upper right of the store.

No go for me stillโ€ฆ

  1. Uninstalled 0.2
  2. Installed add-on again as 0.3
  3. Used puttygen to generate public/private key combo
    image
  4. Copied generated public key into configuration. Saved private key to filed on my computer.
  5. Restarted add-on. Below is my log
  6. Restarted HA.
  7. Pointed putty to the saved private key, tried to connect to HA on port 22222
    image
1 Like

Wait, thatโ€™s different. Please update once again. I fixed it so it wonโ€™t throw that error on your system anymore. But I think that may be irrelevant. I can see youโ€™re connecting so that means we created the file properly. I think you may have had a copy-paste error, using the wrong key to connect, maybe you need to reboot again, or something. You are connecting, which is impossible before a key is added. So the configurator added a key for sure.

I dont know what I can be doing wrong. If you can see an error in my process, let me know. Or else Im just gonna have to give up at this point and just chalk it up to the blue hardware not supporting SSH into port 22222

  1. Open puttygen, generate new pair
  2. Copy entire public key
    image
  3. Paste key into configurtion
  4. Press save and it re-formats the key and asks me to restart add-on
  5. Check my log

    6.Restart HA
  6. In puttygen, save private key as test5.ppk
  7. Open putty, set address homeassistant.local: 22222
  8. Point Auth to test5.ppk
    image
  9. Set auto login to root
    image
  10. Press open
  11. Tries to connect, error.
    image
1 Like

How are you restarting? Thereโ€™s multiple levels.

  1. Configuration screen restart (Server)
  2. Restart core (supervisor)
  3. Restart Supervisor(supervisor)
  4. Reboot Host (supervisor)
  5. Hard Power Off (Physical)

4 or 5 should work.

I donโ€™t use putty, but can we try linux instead? You have an ssh-capable linux if you installed the ssh and terminal app. Try this in the ssh terminal.

  1. ssh-keygen (press enter when asked, use defaults, only enter responses)
  2. cat ~/.ssh/id_rsa.pub to get your key. Itโ€™s all one line and looks like this when copied properly.
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWO0Vp1MqMbcCZeXJArsZlBX6wvXPQ1zokAdFj1flVPu3E44KVkQlTakuxDGFiWzBoRhjs7GxciKPobTrbScpCaebfAjDjYBPF925Cm/AlCorQtfMDmCEXTcUdtQ4BMzvjOmo2GXyQ+TR3ACNyBj8Nc6ZmTeHbcsUki26UB0tYmhYNuL5zt3H/sVKgOkUfkyiKwNiyWA8FeLMOxvtncf9D20sIlVxpFL8GYkuCy5w3S3uLjsG/Y57nbwcMzAY+qD2v7BOlLXLJCyYRvhmeZG6oOMMXACaanL0Ix8XLvuWA1Z439HBUW9hurC8+M6VTnaAUXmn0VrbiCg7wD5pTqur9RTI6wuyL6DE6eGJ/7znbJ+++9HBSdfhuXLLFfhikNgE+2DyBwSI/hXs/EcZHcvJ/Y2jvSe2/OiuI+BVXRC0TM+MG8WnQ2K6UDPJo1H70DgPnIUabP9GUDKL+4dZ5F1mUFMWzZA4q16wYqG079nP4goQCY+yRphuMTPOwo6jWNLc= [email protected]

or like this in a terminal. image

  1. copy the key from step 2 into HassOS SSH port 22222 Configurator
  2. restart the configurator
  3. Use Reboot Host method to restart.
  4. Upon restart, within the terminal app, type ssh 127.0.0.1 -p22222

If it worked, then you were able to add your SSH key using this app and we need to troubleshoot putty. If it didnโ€™t work then we need to troubleshoot the app.

Edit: Nvm, just copied the key to a folder I can access from samba.

Rebooting host now

1 Like