At the end of .bashrc I added:
touch /tmp/bash_noninteractive_test Run:
/usr/bin/ssh -v -C [email protected] 'ls' On the host (logged in interactively before):
% ls -l /tmp/bash_noninteractive_test ls: cannot access /tmp/bash_noninteractive_test: No such file or directory I thought ~./bashrc is ALWAYS sourced in non-interactive shells, like over SSH? How do I fix that?
Systems affected:
% lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty and
% lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.11 (jessie) Release: 8.11 Codename: jessie