Change Default Folder on Windows OpenSSH SFTP Server

In the OpenSSH Server bundled with Windows, to change the default folder you're switched to upon connecting:

  • Open C:\ProgramData\ssh\sshd_config in your favorite text editor.

  • Scroll down to the following line in the file:

    Subsystem   sftp    sftp-server.exe
    
  • Replace sftp-server.exe with sftp-server.exe -d "c:\RootFolder", where "c:\RootFolder" is the root folder to load when connecting, so that the line looks like this:

    Subsystem   sftp    sftp-server.exe -d "c:\RootFolder"
    
  • Save your changes and restart the OpenSSH SSH Server service.

The next time you open an SFTP connection to the server, you'll be dropped into the folder you specified above.