I have declared some "PATH" variables in the ".bashrc" file of a remote machine. When I login to the remote machine, all these "PATH" variables work fine. But when I do a "ssh user@remote env", the "PATH"s declared in the ".bashrc" are not read. How can I fix this?
This is the ".bash_profile" in the home directory on the remote machine:
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin: export PATH
This is the ".bashrc" in the home directory on the remote machine:
# .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # PATH export PATH=$HOME/git-1.8/bin/:$PATH
And this is the present output of the command "ssh user@remote env" from my local machine:
SHELL=/bin/bash SSH_CLIENT=NNNNNNNNNNNNNNN USER=XXXXXXXXX MAIL=/var/mail/XXXXXXXX PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/openssh/bin PWD=/volume2/home/hp120242/XXXXXXXXX SHLVL=1 HOME=/home/hp120242/XXXXXXXXXX LOGNAME=XXXXXXXXXXXXX SSH_CONNECTION=NNNNNNNNNNNNNNNNNNN LC_CTYPE=en_US.UTF-8 _=/bin/env
I don't have root permissions on the remote.