sftp chroot access via SSH
Posted
by Cudos
on Server Fault
See other posts from Server Fault
or by Cudos
Published on 2010-04-23T11:49:07Z
Indexed on
2010/04/23
11:54 UTC
Read the original article
Hit count: 295
Hello.
I have this setup in sshd_config:
AllowUsers test1 test2
Match group sftpgroup
ChrootDirectory /var/www
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Match user test2
ChrootDirectory /var/www/somedomain.dk
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
I am trying to restrict test2 to only use /var/www/somedomain.dk
For some reason when I try to login e.g. with Filezilla on account test2 I get this error: "Server unexpectedly closed network connection"
The users are created and works. the SSH service has been stopped and started. test1 works when using e.g. filezilla and the root of the connection is /var/www. What am I doing wrong?
© Server Fault or respective owner