配置SFTP访问权限。
- 打开PowerShell命令提示符(以管理员身份运行)。
- 编辑SSH服务器配置文件
sshd_config
,在此文件中配置SFTP访问权限。notepad C:\ProgramData\ssh\sshd_config
- 在文件中添加以下行:
将Match user your_username ForceCommand internal-sftp PasswordAuthentication yes ChrootDirectory %UserProfile% AllowAgentForwarding no AllowTcpForwarding no X11Forwarding no
your_username
替换为您要配置SFTP访问权限的用户名。 - 保存并关闭文件。