Whether changing that is a good idea or not isn’t really the question. (And this poking around is all in a sandbox HAOS.)
But looking at this led to questions:
If I wanted to change the sshd_config is the solution to run my own version of sshd via /addons (or a feature request)?
And this gets into the weeds a bit:
If I modify /etc/sshd_config and restart the app (ha apps restart a0d7b954_ssh) the config gets reset. I’ve modified things in other containers and restarted (e.g. ha core restart) and the changes persist (until an update). Are apps restarted differently or did I miss in the Dockerfile where it is copied fresh?
I’m just trying to get a better understanding of how the mechanics work.
Another mildly annoying thing is up update I lose my history. Anyone know a fix for this?
System is ready! Use browser or app to configure.
zsh: corrupt history file /root/.zsh_history
Having history persist across updates would be handy – which I assume was intended because that’s why it’s in /root/.
You can certainly do a git clone from the ssh app to addons, and change the config.yaml and Dockerfile and make the settings you want and build the image locally. You have to remove the image tag from the config.yaml file so you don’t downloading the image from the net.
Well, that wasn’t my question, and I’m not sure how to measure “better”.
It’s not just .bash_profile. It was to change sshd_config before sshd starts as described in the first post – and to learn more about the app mechanics.
The developer is Franck, and, besides being somewhat occupied with other things, I assume he changed the default sshd_config behavior 9 years ago on purpose.
But if you follow my first advice, from the beginning.
You make a git clone to the addons directory and then remove the build.yaml file.
Change the sshd_config file which is under the rootfs/etc directory.
Build your own ssh image yourself and not download the already built image.
And change the slug: ssh in config.yaml, to your own name, so you don’t make a collision.
Not a huge difference, right? Still have to build off of a parent container, and doing this is just making a few changes to the existing app. Sure, I could just build it all locally.
Local apps have local_ prefixed to the slug so that doesn’t seem to be an issue – I was running both at the same time for a while.