I'm hoping to get the $BASH_ENV
var to source for non-interactive ssh commands.
I do see my BASH_ENV:
ssh server.example.com env | grep BASH
BASH_ENV=/tmp/set_bash_env_profile
If I do simple ssh login, and env | wc -l
I get 85, thanks to $BASH_ENV
env var, but if:
ssh server.example.com env | wc -l
17
I get just 17...
I tried ForceCommand
in the sshd_config as described here but in my case, the SSH_ORIGINAL_COMMAND
is not being set.
BASH_ENV
in/etc/environment
, as I want the effects of$BASH_ENV
to affect EVERY user. (and I can't simply put all vars in/etc/environment
as$BASH_ENV
stipulates on$LOGNAME
as it sets up the variables) – lzc Sep 14 '16 at 15:59