SFTP issue and cannot find out the path

Jonathan 360 Reputation points
2026-09-04T02:09:37.2166667+00:00

Hi,

I have the SFTP issue on the client to link to Server 2022. How to fix it and find out the path below?

User's image

Windows for business | Windows Server | Networking | Network connectivity and file sharing

1 answer

Sort by: Most helpful
  1. AI answer

    2026-09-04T02:09:54.1666667+00:00

    For OpenSSH SFTP on Windows Server 2022, the main configuration file path is:

    %ProgramData%\ssh\sshd_config

    ProgramData is a hidden folder, so the full default path is:

    C:\ProgramData\ssh\sshd_config

    To troubleshoot the SFTP issue:

    1. Open C:\ProgramData\ssh\sshd_config with an administrator account.
    2. Validate the configuration by running:
         sshd -t
      
    3. Check that the file has no trailing spaces and that this entry is present:
         Subsystem sftp sftp-server.exe
      
    4. If SFTP users are expected to be restricted to a folder, verify that ChrootDirectory points to a local directory, not a UNC path.
    5. Check NTFS permissions on the chroot directory and user-writable folders. Use icacls from an elevated Command Prompt to verify and fix ACLs.
    6. Review Event Viewer for related OpenSSH errors.
    7. After any change, restart the OpenSSH Server service.

    If logs are needed, SFTP log data is stored in:

    %ProgramData%\ssh\logs

    To enable SFTP logging in sshd_config, set:

    SyslogFacility LOCAL0
    LogLevel DEBUG3
    Subsystem sftp sftp-server.exe -f LOCAL0 -l DEBUG3
    

    Then restart the service with:

    NET STOP "OpenSSH SSH Server" && NET START "OpenSSH SSH Server"
    

    If the service does not start or SFTP connections hang even after correcting the configuration and permissions, uninstall and reinstall OpenSSH Server.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.