When bash is started by the sshd daemon to run a non-interactive command, the ~/.bashrc script is not loaded.
Steps to Reproduce
- Set ZOSOpenTools bash as standard shell in OMVS segment
- Run ssh command non-interactively (e.g.
ssh [host] -- "env")
- See that environment is missing required variables
Expected Behavior
Bash should source the bashrc file, even in an non-interactive session, when called by sshd or other remote daemons.
See "Invoked by remote shell daemon" in section 6.2 of the bash manual (https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files).