vim /etc/ssh/sshd_config
将
Subsystem sftp /usr/libexec/openssh/openssh/sftp-server
替换为
Subsystem sftp internal-sftp
然后重启服务
systemctl restart sshd.service