When setting environmental variable in Toolchain file, I see it set when locally logged into build machine. When I run the same thing during a SSH session, it doesn’t set. Is this by design?
Environment variables in a toolchain file affect the process that reads it. Your SSH session is unlikely reading the toolchain file for its environment settings.
How are you inspecting the environment in each case?