Is there any method, with ChrootDirectory and internal-sftp, to automatically cd to a subdir on login?

Peter Stuge peter at stuge.se
Fri May 11 09:34:40 EST 2012


Whit Blauvelt wrote:
> Thanks for any advice

Quoting sshd_config(8):

     ChrootDirectory
             Specifies the pathname of a directory to chroot(2) to after
             authentication.  All components of the pathname must be root-
             owned directories that are not writable by any other user or
             group.  After the chroot, sshd(8) changes the working directory
             to the user's home directory.

So set the home directory to what you want them to land in, relative
the ChrootDirectory root.


//Peter


More information about the openssh-unix-dev mailing list