I am working with OpenSSH downloaded from https://github.com/PowerShell/Win32-OpenSSH/releases.
My goal here is to setup an ssh server that allows sftp files transfer without ssh access. According to the official documentation provided by OpenSSH, this should be supported on Windows since version 7.7. was released and the restriction should be set up in sshd_config and I tried to play with this file for a while, but I wasn't able to restrict myself to be able to only access the subfolders, this is what I have in my config file added:
Subsystem sftp sftp-server.exe
ForceCommand internal-sftp
ChrootDirectory c:\users\myusername
AllowTcpForwarding no
PermitTunnel no
GatewayPorts no
Can anyone tell me why this is not working? Or I cannot setup SFTP access only like this?
Another option would be to disable SSH connection. How do I achieve that with OpenSSh in Windows?