System: Ubuntu 18.04 Server VSFTPD installed.
What I got so far:
sudo adduser user sudo mkdir -p /opt/chroot/transfer sudo chown user /opt/chroot/transfer
# */etc/ssh/sshd_config*
Include /etc/ssh/sshd_config.d/.conf
Port 22
ChallengeResponseAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
#ChrootDirectory /opt/chroot/transfer (
AcceptEnv LANG LC_
Subsystem sftp /usr/lib/openssh/sftp-server
Example of overriding settings on a per-user basis
Match User user
X11Forwarding no
AllowTcpForwarding no
PermitTTY no
ForceCommand cvs server
PasswordAuthentication yes
/etc/vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=NO
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
allow_writeable_chroot=YES
I can't get any further. User can access anywhere. :/ User is supposed only have access via ssh (port 22) to /opt/chroot/transfer