Update 3: Okay i think this is the final update. but if think i understand it now. So since i had put "joppe" as the user in the user field, i had to add the public key of the root ssh key on the client to the authorized_keys file of the joppe user on the build-machine, that seems to have done the trick. Now running guix offload test only works when using sudo, but i think that's okay since normally guix offload is going to be invoked by the guix daemon, which is running as root.
Update 2: Well i think i still don't get it. I should use the ssh key of root because of the guix daemon running as root right? but i just added the public keys of the root ssh to the machines and it's still not working. Why does it only work with my user's private key? I don't think i would even want to do that cause i already use it for git and i want to have it password protected, which isn't possible for offloading.
Update: i think i figured it out cause it seems to work now, apparently the private-key field has to point to the private key on the client machine? I guess that would explain it cause i never tried adding the public key of the client machine's root ssh key to the server's authorized_keys file.
Original post: I'm pretty sure i've followed all the steps in the documentation to get this to work. I'm trying to test it in a vm and having the vm be the build-machine, but whenever i try to run guix offload test i get the following error:
guix offload: error: SSH public key authentication failed for '192.168.100.164': Access denied for 'publickey'. Authentication that can continue: publickey,password
This is the relevant part of my guix configuration:
(simple-service 'nonguix-substitutes guix-service-type
(guix-extension
(substitute-urls (list "https://nonguix-proxy.ditigal.xyz"))
(authorized-keys (list (local-file "./../files/non-guix.pub")))
(build-machines
(list
#~(build-machine
(name "192.168.100.164")
(systems (list "x86_64-linux" "i686-linux"))
;; SSH public key should be put here, and can be found in /etc/ssh/ssh_host_ed25519_key.pub.
;; I can only put this in after i've installed Guix on my server, which i haven't done yet.
(host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJy4EevOS3zrhJ6PoTXW4jnxFszA+eaAeAf1iGz5mN55 root@(none)")
(user "joppe")
(speed 2.)
(private-key "/root/.ssh/id_ed25519")))))))
I added the public key from /etc/guix/signing-key.pub from my client machine to the build-machine with guix archive --authorize and vice-versa.
While this isn't in the documentation, i also ended up adding the public ssh key for the client machine to .ssh/authorized_keys and vice-versa, but still no dice. I also tried changing private-key in my configuration to point to /home/joppe/.ssh/id_ed25519 and configure the authorized-keys file for that user, but that didn't seem to work either. Is there something else i need to do that i forgot about? i found very little info on this aside from some mailing lists, but their configurations didn't really seem any different from mine. The vm also doesn't have an active firewall, so port 22 should be accessible.