1、下载
https://github.com/PowerShell/Win32-OpenSSH/releases
2、默认安装
.......
3、创建用户
4、修改配置文件
C:/ProgramData/ssh/sshd_config# 最后一行后面加入ForceCommand internal-sftp# 设置用户登录后默认目录Match User sftpuserChrootDirectory C:/SFTP# Disable tunneling, authentication agent, TCP and X11 forwarding.PermitTunnel noAllowAgentForwarding noAllowTcpForwarding noX11Forwarding noPermitTTY no
5、重启服务
net stop sshdnet start sshd
6、防火墙放行22端口