0

I'm having a problem with Yosemite, it won't set the environment variables when doing:

ssh localhost
env | grep myvar

no sign of myvar. I've managed to get Yosemite to set the environment variables for terminal sessions etc using the excellent suggestion here.

Why is it not working for the ssh session?

1
  • How are you setting mylar?
    – mmmmmm
    Commented Nov 18, 2014 at 18:15

1 Answer 1

1

Did you try to add your variable to your .bash_profile: export MYVAR="Whatever"

$ . .bash_profile
$ echo $MYVAR
Whatever
$ ssh localhost
Password:
Last login: Tue Nov 18 18:58:41 2014 from localhost
$ echo $MYVAR
Whatever
$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .