Chroot %u token not working.
Server 2019 OpenSSH 8.1.0.0
Is the %u token not supported on Windows?
I have a domain joined sftp server and would like to chroot my domain users to their home directory which is "x:\home\username"
"ChrootDirectory x:\home" works, but "ChrootDirectory x:\home\%u" does not and immediately disconnects.
OpenSSH for Windows: 8.1.0.0 Server OperatingSystem: Windows Server 2016 Standard
We are having the same issue for domain accounts. Any news here? Is there a description somewhere of how %u is expanded when a user logs in with user@domain or domain\user?
I started to look into the code and figured out a workaround (or maybe this is expected?):
For example, with this setting:
ChrootDirectory D:\sftp\%u
The result when user@domain logs in is that it tries to access this folder:
D:\sftp\domain\user
As for now this works fine for us.