#community ssh addon chroot jail

1 messages · Page 1 of 1 (latest)

foggy rock
#

Hello everybody,
today I installed the community version of the ssh addon. Everything went fine, I can login using ssh, but even though I deactivated safe mode, I seem to be caught in some kind of chroot jail. I cannot see the whole file system etc.
On the physical console, this jail can be left by simply typing "login", without having to provide any credentials.
From the ssh login, however, this does not work. Using the physical console is of course not an option on a headless raspberry pi.
Regards
Thomas

hardy coyote
#

Everything is in containers

#

so yes, the SSH add-on is a container too

foggy rock
#

Is there any way to get out of it?

hardy coyote
#

No, there is no reason/use to do that either?

#

What would you like to do that makes you want to break out of the scope?

foggy rock
#

Well, on my virtual machine I did a small fix to a addon source (daly bms in esphome). I just edited the .cpp file. Unfortunately I am not familiar with docker and the whole build process.

#

Anyway, I do not feel comfortable using/owning a computer I do not have full control of

hardy coyote
#

🤷‍♂️ I think you misunderstand how it works. There is nothing to control on the OS level

#

the OS level is a embedded operating system, meaning its read-only

#

I think you are approaching your reasoning from a normal OS perspective, which this all is not.

#

(and really... you should not have to edit files like that 😬 Have you raised an issue to get it fixed?)

foggy rock
#

Yes, indeed. Somebody else also did so in April and even provided a fix himself. His PR has not been merged yet - 3 monts later.

hardy coyote
#

Can you point me to the PR?

foggy rock
#

Give me some minutes, I have to look it up

#

the original problem was described in 3086
the fix is in 3388
3452 is the issue I added yesterday, regarding the addressing problem (0x80 vs 0x40)

hardy coyote
#

Hmz ok, the PR has still an unresolved build error

#

so it can't be merged.

#

left a comment on the PR

#

so, how you can approach this (alternatively)

#

is adding daly_bms as a custom component to your device

foggy rock
#

Oh, that's a pity. I would very much like to fix all this myself, but to do so, I would need a "cookbook" about all the involved (build-)processes.

hardy coyote
#

That removes the need for patching "things"

foggy rock
#

Could you point me to a description on how to do this?

#

I am an experienced C++ programmer but did not find too much docs about the build process

hardy coyote
#

That will make your device use the component from that PR directly

foggy rock
#

Which would not work of course if there is still a build error in the pr

hardy coyote
#

Its a styling thing

#

so, not an error in terms of wrong code

#

Worth a shot, right? 😄

#

You can also copy the existing daly_bms component

foggy rock
#

ah, ok. Can I also do a fork and point the source to that fork? I have to change the addressing because the (hard coded) 0x80 does not work with my bms

hardy coyote
#

and make the adjustments yourself

#

You can make a local folder

#

copy the existing daly_bms folder from esphome components into it

#

add:

external_components:
  - source:
      path: /my_path_to_the_folder_with_my_custom_components

and modify the component in there

foggy rock
#

where does this folder have to be? And where should I copy it from ?

hardy coyote
#

Both ESPHome and Home Assistant have been set up to allow overrides or extension of anything.

hardy coyote
#

that would make it sit next to the device yaml file, right?

foggy rock
#

And I take it from the git checkout or from somewhere in the existing installation?

hardy coyote
foggy rock
#

Ok, I'll give that a try. If I'm stuck, I will come back to you. Thanks a lot

hardy coyote
#

(its in esphome/components/daly_bms in that zip

#

No problem!

foggy rock
#

Ok, seems to work, thank you so much! One more question: I would now like to take a backup from my (virtual) test system and restore it to my Pi. Do I have to install the addons on the Pi first or will they be installed automagically when I restore the backup?

hardy coyote
#

it will automatically handle all add-ons as well

foggy rock
#

cool, thanks

#

Anyway, It will take some time for me to get comfortable with having a system I do not have full control of. That's why I do not use iPhones in the first place....

hardy coyote
#

🤷‍♂️ Its actually, honestly, really comfortable not to worry about tons of things.

#

But... if time learns you are not into containers

#

you always switch to another installation methods 🤷‍♂️

#

But would recommend to give it chance 😄

foggy rock
#

But would recommend to give it chance
Yes, I definitely will, even more since the other installation methods are strongly deprecated all over the web site.

hardy coyote
#

🤷‍♂️ We have 4 supported installation methods on our website. Non of the installations methods listed on our website are deprecated

#

95% of our user-base uses the OS or Container based installation methods

foggy rock
#

Ok, I got the impression they are - at least a little bit. Anyway, for the time being I will stick to OS. When I have much spare time (which is unlikely to happen in the near future) I will test the others

hardy coyote
#

Ok, I got the impression they are - at least a little bit.
Nope, there is only personal preference. We recommend the OS, of course, as it provides the full experience we have to offer (and really, is the easiest to operate)