Skip to content
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

initrd-tinysshd: what installs authorized_keys? #61

Closed
lachesis opened this issue Apr 19, 2020 · 5 comments
Closed

initrd-tinysshd: what installs authorized_keys? #61

lachesis opened this issue Apr 19, 2020 · 5 comments

Comments

@lachesis
Copy link

I am trying to get remote-unlocking working with my encrypted root. I ran the commands given in the README Example section (except the debugging tools one, as I don't have mc installed).

When I inspect the generated initramfs, my authorized_keys file is nowhere to be found. When I try to log in to the tinyssh server, I get an error because my key is not authorized. I cannot find any references to copying the authorized_keys file anywhere in this repo.

@Andrei-Pozolotin
Copy link
Collaborator

try
https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/README.md

which ssh user keys are used by initramfs sshd server(s)?

they come from host /root/.ssh/authorized_keys

@lachesis
Copy link
Author

Interesting, that did not seem to be true on my system. That file exists but a 0-byte file was written to the initramfs.

@Andrei-Pozolotin
Copy link
Collaborator

try to confirm if this works
https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/src/initrd-shell.service

# include ssh credentials
InitrdPath=/root/.ssh/authorized_keys source=/root/.ssh/authorized_keys mode=600

@lachesis
Copy link
Author

Oho I didn't see that unit at all. That explains where it's being done. That wasn't included in my system for some reason. I just got everything working so I'm a bit hesitant to dig into it right now. I will troubleshoot further this week and get back to you. Thanks!

@Andrei-Pozolotin
Copy link
Collaborator

ok, cool :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants