Re:Show HN: A fix for the .bash_profile .bashrc .profile mad...
by lloeki on Saturday August 11, 2012 @11:23AM
(#4370251)
> Do you mean that an interactive shell should load .bash_profile?
No, ssh logs you in, so it is a login shell (and thus calls {bash_,z}profile), but if you call 'ssh ls', it is not an interactive shell since you just ask ssh to launch the 'ls' command remotely.
> Logging into my OS X system with ssh loads .profile
sshd starts login(1) (which shows the 'Last login:' line), which calls your shell as login
No, ssh logs you in, so it is a login shell (and thus calls {bash_,z}profile), but if you call 'ssh ls', it is not an interactive shell since you just ask ssh to launch the 'ls' command remotely.
> Logging into my OS X system with ssh loads .profile
sshd starts login(1) (which shows the 'Last login:' line), which calls your shell as login