nix-community / nix-user-chroot

Install & Run nix without root permissions [maintainer=@Mic92]
MIT License
281 stars 25 forks source link

ssh does not work inside nix-user-chroot #97

Closed jarkkojs closed 1 year ago

jarkkojs commented 1 year ago

Result:

Bad owner or permissions on /etc/ssh/ssh_config.d/50-redhat.conf

Other:

$ ls -l /etc/ssh/ssh_config.d/
total 4
-rw-r--r-- 1 nobody nobody 831 Jan 21  2022 50-redhat.conf

Environment:

Can be worked around by using dbclient from dropbear for common use cases (e.g. ssh logins and git) but e.g. mosh does not play well with it.

Mic92 commented 1 year ago

The problem here is that all uid's outside of nix-user-chroot are mapped to nobody. With unprivileged usernamespaces we can only ever map one user at the time. This is a restriction of Linux works. Since you are using wsl2 can you not install nix normally?