Hello
Thank you for posting in Q&A forum.
The official documentation for OpenSSH on Windows does state that the AcceptEnv directive is not supported. This can be confusing, especially since you've observed it working under certain conditions.
The discrepancy might be due to the way OpenSSH is implemented on Windows compared to Unix-like systems. While some features might appear to work, they aren't officially supported and could lead to inconsistent behavior, particularly with non-admin accounts.
To ensure reliable and secure operation, it's best to follow the official guidelines. If you need to pass environment variables, you might consider alternative methods, such as:
- Using PowerShell Profiles script.
- Group Policy.
- Login Scripts.
I hope the information above is helpful.
If you have any questions or concerns, please feel free to let us know.
Best Regards,
Daisy Zhou
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.