We had been using OpenSSH 3.8.1 P1 until moving to new Windows 64-bit environments. That version of OpenSSH returned the full Windows environment to the non-interactive SSH login, allowing us full access to the environment variables. In newer versions of OpenSSH, starting with 4.0, the environment returned is a paltry subset of the Windows System environment variables. We searched the OpenSSH mailing list discussion and found the request that it be changed to return "only what is needed", and it appears that was implemented in OpenSSH 4.0. I'm not sure who got to decide "what is needed", but it does not match our requirements. Is there some way to get OpenSSH to return the full Windows environment variable set without having to list specific ones in the .ssh/environment file, or a .bashrc or .profile file? Sometimes these variables change due to new tool version installations, and we don't want to have to modify an additional file to be able to execute via SSH.


Might need some more details but...

My first thought is try using PsExec inside of your SSH session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy