Skip to content

Bash does not source users bashrc file when started by non-interactive ssh command #65

@DorianCzichotzki

Description

@DorianCzichotzki

When bash is started by the sshd daemon to run a non-interactive command, the ~/.bashrc script is not loaded.

Steps to Reproduce

  1. Set ZOSOpenTools bash as standard shell in OMVS segment
  2. Run ssh command non-interactively (e.g. ssh [host] -- "env")
  3. 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).

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions