Search notes:

~/.bashrc

~/.bashrc is executed for interactive non-login shells.
Apparently, it should contain elements that are not inherited through the environment, such as aliases and functions. Since (exported?) environment variables are inherited to child processes, env var definitions can and should go to ~/.profile).
Because .bashrc is also read during non-interactive SSH command execution, it should start with a check for interactiveness:
if [[ "$_" != *i* ]]; then
# Not running interactively
  return
fi

See also

/etc/bashrc, /etc/skel/.bashrc

Index