-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User SSH authorized keys are not added by ignition #70
Comments
I have the same results when using Fedora-IoT-raw-41-20241027.0.x86_64.raw.xz image inside a VM. |
I ran into this issue as well with a non-root user. It worked fine for root. I haven't tested this yet, but I think you may need to mount /home in the ignition file for non-root users. See https://opensuse.github.io/fuel-ignition/edit in the Add user and Mount /home sections. Granted that's for SUSE but I suspect it's a similar issue. |
I was able to reproduce this with the Fedora 40 ( And to be honest, I don't think we have ever tested using Ignition with the raw disk, nor have we ever supported that combination. We have only supporte/tested Ignition with the use of the simplified-provisioner - https://docs.fedoraproject.org/en-US/iot/ignition-device-setup/ @runcom can you weigh in here? |
With the raw image we don't have a separate /home directory, is that something that ignition "expects"? |
Not sure. It eventually shells out to
I would have expected Adding to this,
No SELinux denials,
|
I'm seeing similar problems using the IoT 41 |
Confirming the same for
Interestingly, I logged in as I tried to add a |
Started investigating this, I was able to reproduce it and I found/learned a couple things:
I'll continue with trying to figure out where these rpms got lost along the way and if they're the only issue. Also a big thanks to @runcom for helping me get started on this, your help was much appreciated! |
Both packages are present in the |
Neither is included in the commit created in koji - https://pagure.io/fedora-iot/ostree/blob/main/f/fedora-iot-base.yaml We should check for other discrepancies. |
this is indeed the issue with this and #49 |
Submitted a pr to add the packages necessary to fix this here: https://pagure.io/fedora-iot/ostree/pull-request/66 I was able to login with ssh successfully and both a home directory and a .ssh directory were created, so I believe this is sorted out. Going to wait to close until the pr is merged. |
Closing now that PR is merged. |
Let's keep this open until we get a working compose with the fix. |
This issue tracker is intended only for IoT specific issues. Please try to reproduce the issue on a relevant Fedora release to determine if the issue is specific to IoT or a general issue in Fedora. If is a general issue in Fedora, please report it in Red Hat Bugzilla (see How to file a bug) or in an upstream project and not in this issue tracker.
Describe the bug
When using the following ignition config (generated from a Butane file), with the image Fedora-IoT-raw-41-20241027.0.aarch64.raw.xz on a Raspberry Pi CM4:
The hostname is set, the firmware user is created with the desired password, but the SSH key does not seem to be added anywhere. When trying to login I see my SSH client offering the public key, but then I still get asked for the password. So I think the public key was never deployed to the device.
When logging in to the device (with password) I get the following message:
Could not chdir to home directory /var/home/firmware: No such file or directory
Maybe this is related, since the authorized_keys file is usually placed inside the users home directory.
To Reproduce
Please describe the steps needed to reproduce the bug:
sudo ./arm-image-installer --image=../Fedora-IoT-raw-41-20241027.0.aarch64.raw.xz --media=/dev/sda --resizefs --target=rpi4 --selinux off
Expected behavior
When provisioning is finished, I am able to login as the firmware user with the SSH key
Screenshots
If applicable, add screenshots to help explain your problem.
OS version:
Fedora-IoT-raw-41-20241027.0.aarch64.raw.xz
Additional context
redacted SSH client output:
The text was updated successfully, but these errors were encountered: