# Cannot access env vars through SSH

**URL:** <https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687>\
**Category:** Build Environment\
**Tags:** envars\
**Created:** [December 13, 2016, 7:21pm UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687 "2016-12-13T19:21:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbly](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sbly/32/14815_2.png) [@sbly](https://discuss.circleci.com/u/sbly)\
**Post date:** [December 13, 2016, 7:21pm UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/1 "2016-12-13T19:21:44Z")

</div>

I’m running a command in `circle.yml` that uses a sensitive environment variable which I’ve set through the dashboard. The command is failing, and I’m trying to figure out why by running the build with SSH turned on. However, when I’m on the machine, the environment variable does not appear to be set: `echo $MY_VAR` is empty.

---

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [December 13, 2016, 9:15pm UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/2 "2016-12-13T21:15:19Z")

</div>

Does this happen to be a fork of another project?

---

<div class="post-metadata">

**Author:** ![ulsa](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/ulsa/32/15038_2.png) [@ulsa](https://discuss.circleci.com/u/ulsa)\
**Post date:** [January 4, 2017, 10:45am UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/3 "2017-01-04T10:45:25Z")

</div>

I have the same problem. Environment variables set via dashboard are not available with `env` command when SSH’d in to the build machine.

The project is not a fork (not sure why that would be relevant, though).

---

<div class="post-metadata">

**Author:** ![olalonde](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/olalonde/32/16099_2.png) [@olalonde](https://discuss.circleci.com/u/olalonde)\
**Post date:** [May 15, 2017, 11:18pm UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/4 "2017-05-15T23:18:11Z")

</div>

I have the same issue… environment variables aren’t set when I ssh into the build machine.

---

<div class="post-metadata">

**Author:** ![alvincrespo](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/alvincrespo/32/14658_2.png) [@alvincrespo](https://discuss.circleci.com/u/alvincrespo)\
**Post date:** [May 23, 2017, 5:13pm UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/5 "2017-05-23T17:13:54Z")

</div>

Yeah same here. Can’t seem to access env vars set through the dashboard.

---

<div class="post-metadata">

**Author:** ![bbnnt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/bbnnt/32/12176_2.png) [@bbnnt](https://discuss.circleci.com/u/bbnnt)\
**Post date:** [June 1, 2017, 11:02am UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/6 "2017-06-01T11:02:21Z")

</div>

feel bad to ping it up too, but stuck with the same one

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:38am UTC](https://discuss.circleci.com/t/cannot-access-env-vars-through-ssh/8687/7 "2018-06-18T11:38:58Z")

</div>


