# Environmental Variables not setting during SSH session

**URL:** https://discourse.cmake.org/t/environmental-variables-not-setting-during-ssh-session/1605
**Category:** Usage
**Tags:** os:linux
**Created:** [July 21, 2020, 5:19pm UTC](https://discourse.cmake.org/t/environmental-variables-not-setting-during-ssh-session/1605 "2020-07-21T17:19:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jwinarske](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/e79b87/32.png) [@jwinarske](https://discourse.cmake.org/u/jwinarske)
#### Post date: [July 21, 2020, 5:19pm UTC](https://discourse.cmake.org/t/environmental-variables-not-setting-during-ssh-session/1605/1 "2020-07-21T17:19:54Z")

</div>

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?

Example here: [https://github.com/jwinarske/rpi-vision/blob/master/cmake/clang.toolchain.cmake](https://github.com/jwinarske/rpi-vision/blob/master/cmake/clang.toolchain.cmake)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 11, 2020, 5:30pm UTC](https://discourse.cmake.org/t/environmental-variables-not-setting-during-ssh-session/1605/2 "2020-11-11T17:30:57Z")

</div>

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?
