My environment configuration is different when I execute commands using ssh string parameter (non-interactive ssh) instead of running them by hand in server (interractive ssh)?
Example: When I run ssh <user@servername> "echo \$SGE_ROOT", I get empty string. When I connect to my server ssh <user@servername> and run command echo $SGE_ROOT I get /opt/gridengine.
I guess some kind of profile script is not executed. Is it possible to find out which script and run it through non-interactive ssh to make environment configuration identical?
Server uses CentOS 6.6.
ssh <user@servername> "source /etc/profile; echo \$SGE_ROOT"worked.