Hammed M. wrote:
The .bashrc file is on the remote server which is OSX.
According to http://www.osxfaq.com/tips/unix-tricks/week105/monday.ws
, non-login shells don’t run any scripts on startup:
Non-interactive shells. When you run a shell script, a new shell is
launched to execute the script. The new shell is a non-interactive
(non-login) shell. It does not source any scripts on startup.
The ssh session is a login shell. A Non-interactive shell is when you
execute a shell script. The ssh session logins you in.
I added this line to my .bashrc on my OS X server,
echo “Hi there”
Then I sshed to that machine from another server
stork$ ssh ray@auk date
Wed May 17 22:46:55 PDT 2006
You can see that the contents of the .bashrc appear.
Your problem may be the presence of a .bash_profile
When bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes com-
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior.