So I discovered many binaries are in guix, just hidden from the user, you can call sshd from guix shell openssh, just that it can't be seen from outside.
My attempt:
# This is messy and not really a guix way, but for now best I can do sudo mkdir -p /etc/ssh sudo tee /etc/ssh/sshd_config <<-EOF PermitRootLogin yes PermitEmptyPasswords yes EOF sudo groupadd sshd sudo useradd -g sshd sshd sudo ssh-keygen -A sudo guix shell openssh -- sh -c '"$(which sshd)"'
Edit: What happens when you normally try it.
guest@gnu ~$ sshd bash: sshd: command not found guest@gnu ~$ guix shell openssh -- sh -c sshd sshd re-exec requires execution with an absolute path guest@gnu ~$ guix shell openssh -- sh -c $(which sshd) which: no sshd in (/run/setuid-programs:/home/guest/.config/guix/current/bin:/home/guest/.guix-profile/bin:/run/current-system/profile/bin:/run/current-system/profile/sbin) sh: -c: option requires an argument guest@gnu ~$ guix shell openssh -- sh -c "$(which sshd)" which: no sshd in (/run/setuid-programs:/home/guest/.config/guix/current/bin:/home/guest/.guix-profile/bin:/run/current-system/profile/bin:/run/current-system/profile/sbin) guest@gnu ~$ guix shell openssh -- sh -c '"$(which sshd)"' /etc/ssh/sshd_config: Permission denied guest@gnu ~$ sudo guix shell openssh -- sh -c '"$(which sshd)"' guest@gnu ~$