You are not logged in.

#1 2020-10-23 23:31:02

mmsamuelmohr
Member
Registered: 2020-10-23
Posts: 5

[solved] authorized_keys location of tinysshd in mkinitcpio-systemd-t…

Hello everyone,

I try to set up an encrypted system with remote unlocking as it is described here:
https://wiki.archlinux.org/index.php/Dm … _partition

I started using mkinitcpio-systemd-tools and enabled initrd-tinysshd.service.

Tinysshd seems to start; it is listening on port 22 and an ssh attempt returns:

Permission denied (publickey).

Obviously, I need to tell tinysshd where my authorized keys are stored.

This page
https://manpages.ubuntu.com/manpages/bi … shd.8.html
suggested ~/.ssh/authorized_keys but it is not working with the public keys stored in /root/.ssh/authorized_keys.

https://wiki.archlinux.org/index.php/Dm … yssh,_ppp)
suggests to put this information to /etc/tinyssh/root_key
but this does not help, too.

Putting the keys to /etc/tinyssh/sshkeydir/authorized_keys did not work, too.


Has anybody successfully set up tinysshd with mkinitcpio-systemd-tools. I appreciate comments about things I am doing wrong.

Best,
Samuel

Last edited by mmsamuelmohr (2020-10-24 09:57:51)

Offline

#2 2020-10-24 00:08:42

loqs
Member
Registered: 2014-03-06
Posts: 19,042

Re: [solved] authorized_keys location of tinysshd in mkinitcpio-systemd-t…

Have you looked at https://github.com/random-archer/mkinit … hd.service?
Edit:
Also after you made changes did you rebuild the initrd?  If so did you check the newly built initrd for what files were changed in it?

Last edited by loqs (2020-10-24 00:21:36)

Offline

#3 2020-10-24 09:57:02

mmsamuelmohr
Member
Registered: 2020-10-23
Posts: 5

Re: [solved] authorized_keys location of tinysshd in mkinitcpio-systemd-t…

Many thanks for you hint. Checking files in the initramfs using lsinintrd was enlightening:
tinysshd uses the file /root/.ssh/authorized_keys.

Since I have never added the ssh-ed25519 public keys to this file, it was not working.

Thanks a lot for you fast help.

Offline

Board footer

Powered by FluxBB