tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Change to OpenSSH - HomeDirectory



On 12-01-13 09:34 AM, Bernd Ernesti wrote:
For me:
6) There was no description what should be changed in the mail
and I didn't bother to open the url

Fair enough.  I thought that repeating it would be seen as duplication
of effort.  Here is the description from that bug report.

I find that the internal-sftp mostly does what I want except that it
leaves the user in the root of the chroot area.  I can't make the
user's directory the chroot since that is not owned by root.  So I
added code to allow me to specify the home directory.  So, for example,
I have the following Match stanza in sshd_config:

Match Group sftponly
    ChrootDirectory /u/
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp
    HomeDirectory /%u/

Now the user is dropped into his own home directory under the chroot
area.

I'm not sure if the name is correct - we don't have to actually specify
his home directory - but I have tested this on NetBSD 5.1 and it works.

--
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost


Home | Main Index | Thread Index | Old Index