zopencommunity / zopencommunity/bashport
Bash does not source users bashrc file when started by non-interactive ssh command
Open
@IgorTodorovskiIBM is already working on this.
Since Jan 26, 2024.
- Dominant language
- Groovy
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.