Skip to content

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Mar 20, 2024

The current location via tmpfiles.d to install the root ssh keys seems to be not working on firstboot. There is an error that /root/.ssh does not exist from systemd-tmpfiles-setup and indeed the authorized_keys file is on in /root/.ssh.

It seems like everything else in the firstboot in
tmpfiles.d is refering to /var/roothome instead of /root and switching to this for the location of the ssh keys solves the issue.

I tested this via bib and a local container using the new bootc install to-filesystem pipeline :) So hopefully it should finally work.

@mvo5 mvo5 changed the title osconfig: install ssh keys to /var/roothome osconfig: install root ssh keys to /var/roothome Mar 20, 2024
@mvo5 mvo5 force-pushed the tweak-root-ssh-keys branch from 3171be6 to 6b24170 Compare March 20, 2024 16:07
@cgwalters cgwalters added area/install Issues related to `bootc install` triaged This looks like a valid issue reviewed/needs-rework Needs changes labels Mar 20, 2024
@cgwalters cgwalters force-pushed the tweak-root-ssh-keys branch from 6b24170 to bd69633 Compare March 20, 2024 23:50
Copy link
Contributor Author

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks great and works well in my test. There is a tiny tweak in the tests needed it seems though.

@cgwalters cgwalters force-pushed the tweak-root-ssh-keys branch from bd69633 to 247cbdc Compare March 21, 2024 13:13
The current location via tmpfiles.d to install the root ssh keys
seems to be not working. There is an error that `/root/.ssh` does
not exist from `systemd-tmpfiles-setup` and indeed the authorized_keys
file is on in `/root/.ssh`.

It seems like everything else in the firstboot in
tmpfiles.d is refering to `/var/roothome` instead of `/root` and
switching to this for the location of the ssh keys solves the
issue.

Co-authored-by: Colin Walters <walters@verbum.org>
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the tweak-root-ssh-keys branch from 247cbdc to 119dbb4 Compare March 21, 2024 13:14
Copy link
Contributor Author

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! 👍 for all the change that I did not make (which are all relevant ones ;)

@cgwalters cgwalters merged commit e01a518 into bootc-dev:main Mar 21, 2024
@cgwalters cgwalters removed the reviewed/needs-rework Needs changes label Mar 21, 2024
@mvo5 mvo5 deleted the tweak-root-ssh-keys branch April 17, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install` triaged This looks like a valid issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants