1

I am a first time guix user and need assistance doing this basic thing.

I did guix pull and guix install openssh but the sshd command is not there. After typing guix pull and guix install openssh, I have now the openssh package but the sshd command is not there. After reading this excerpt it seems I need to edit a configuration, however this enviroment was just the qemu image of guix. And /etc/config.scm is an empty file. So there is nothing to edit. How can I run the sshd service, after booting in guix?

1 Answer 1

1

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 ~$ 
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.