Trying to follow this tutorial but for Arch Linux.
/etc/ssh/sshd_config:
# override default of no subsystems
#Subsystem sftp /usr/lib/ssh/sftp-server
Subsystem sftp internal-sftp
Match Group filetransfer
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
/srv/www/vhostname:
drwxr-xr-x 6 root root 4096 Apr 23 19:17 .
drwxrwxr-x 25 root root 4096 Apr 23 18:43 ..
drwxr-xr-x 7 user filetransfer 4096 Apr 23 19:25 public
$ grep user /etc/passwd:
user:x:1234:1234::/srv/www/vhostname:/bin/false`
$ groups user
filetransfer user
When connecting from FileZilla, I get this:
Error: Authentication failed. Error: Critical error: Could not connect to server
For some reason I can log in successfully if I change the user's home directory to /
. Some guides say the home directory will be changed to relative to the chroot. But it gets treated absolutely and takes me to the root filesystem directory, which is of course the exact opposite of what I want.
I can also log in successfully if I comment out the chroot line in sshd_config, but that doesn't help.
0 Answers