I am doing ssh to a Open SUSE linux server from windows cygwin. I am trying to send one of my local environment variable through the ssh command so that I can load some specific .bashrc file right after logging in. Here is what I have tried with.
Windows Machine has this env variable
IDENTITY=samiron echo %IDENTITY% samiron
In linux machine I have
vim /etc/ssh/sshd_config AcceptEnv IDENTITY
/home/user/.bashrc I have written something like
My plan is to have a file like
.bashrc.samiron and do
source ~/.bashrc.$ME from
However, I am doing ssh like below and expecting the variable
$ME to contain
ssh -o SendEnv=IDENTITY email@example.com
But after logging
user@server:~> echo $ME
Its shows nothing. Anyone can suggest me what I am doing wrong here?