bashrc not loaded in /bin/bash shell
the ~/.bashrc
file is loaded for interactive non-login shells, that's why running /bin/bash
from ssh works as you expect.
For login shells (amongst others) ~/.bash_profile is read. Typically your ~/.bash_profile
contains something like
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
Which ensures that ~/.bashrc
is loaded if your shell is a login shell.
If your ~/.bash_profile
contains the above and ~/.bashrc
is not being loaded you can debug the scripts by using set -x
as usual.