Linux开启sftp

Step1:编辑ssh配置文件

root@AWS:/lfs# vi /etc/ssh/sshd_config 

注释掉下列内容:

#Subsystem       sftp    /usr/lib/openssh/sftp-server

增加以下内容:

Subsystem sftp internal-sftp -l INFO -f AUTH
Match Group sftp
ChrootDirectory /lfs
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp -l INFO -f AUTH

Step2:重启SSH服务

root@AWS:~# systemctl restart sshd.service

原文地址:https://www.cnblogs.com/networking/p/13711846.html