Great question — answering as the UphillTech team:
The difference is that Debian compiles Bash with the SSH_SOURCE_BASHRC feature enabled , while FreeBSD apparently doesn't . Bash versions with this feature enabled will additionally source ~/.bashrc (and the system bashrc) even if they're non-login and non-interactive, as long as they find the $SSH_CLIENT variable set by sshd (and detect that they're not already running under a parent shell which would've done so). shell.c-1132- /* get the rshd/sshd case out of the way first. */ shell.c-1133- if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 && shell.c-1134- act_like_sh == 0 && command_execution_string) shell.c-1135- { shell.c-1136-#ifdef SSH_SOURCE_BASHRC shell.c:1137:...
Full answer by grawity: https://unix.stackexchange.com/a/787339 (CC BY-SA 4.0).
Need it done for your business? UphillTech.