I tried installing OpenSSH 7.9p1 in my home directory, which be possible without root privileges. "make install" failed with a permissions error. This is on Ubuntu 16.04.5 LTS: $ ./configure --prefix=$HOME/tmp/openssh $ make $ make install ... /bin/mkdir -p /home/smith/tmp/openssh/bin /bin/mkdir -p /home/smith/tmp/openssh/sbin /bin/mkdir -p /home/smith/tmp/openssh/share/man/man1 /bin/mkdir -p /home/smith/tmp/openssh/share/man/man5 /bin/mkdir -p /home/smith/tmp/openssh/share/man/man8 /bin/mkdir -p /home/smith/tmp/openssh/libexec /bin/mkdir -p -m 0755 /var/empty /bin/mkdir: cannot create directory ‘/var/empty’: Permission denied Makefile:330: recipe for target 'install-files' failed make: *** [install-files] Error 1
sshd requires a directory to chroot to which by default is "/var/empty". If your system has one and uses a different path you can tell configure to use -with-privsep-path=/somewhere else.
Minor note: the flag is "--with-privsep-path" (two leading dashes) It seems like "--prefix" should also be prepended to this "/var/empty" path, by default.
(In reply to Ryan Williams from comment #2) > It seems like "--prefix" should also be prepended to this > "/var/empty" path, by default. No, the usual path for that (/var/empty) is outside the usual prefix (/usr or /usr/local). "make install" does already prepend DESTDIR (which defaults to an empty string) to all install paths including that one: $(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH) Assuming you don't want to run an unprivileged sshd you can do what you want with $ ./configure --prefix=/ && make install-nokeys DESTDIR=/home/smith/tmp/openssh If you want the host keys you would probably need to set them up by hand or fiddle with --sysconfdir.
Close bugs fixed in openssh-8.1 release cycle