linux - Access remote machine's exported variable via ssh -
so, trying this:
- in
192.168.1.2machine, had setexport name=arunin.bash_profilefile ofwwwuser - then executed
source .bash_profile. - from
192.168.1.3machine, tryingssh www@192.168.1.2 "echo $name"
this giving me blank. not supposed return me arun?
no. need escape variable evaluated on remote shell, not in local:
ssh www@192.168.1.2 ". .bash_profile;echo \$name"
Comments
Post a Comment