OpenSSH: Set ChrootDirectory for specific user on windows

I Want to set default sftp base path by user on Windows 11 (Jenkins Server) and here is a solutions.

  1. Locate C:\ProgramData\ssh
  2. Start Notepad as administrator >> open file sshd_config
  3. Add following config.
Match User <<YOUR_USERNAME>>
   ChrootDirectory <<DEFAULT SFTP BASE PATH>>
  1. save file sshd_config
  2. restart sshd service

Reference


Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts sent to your email.