How to set environment variable in Yosemite for local ssh sessions 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?
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
$