problem running bash scripts during ssh

Well, this is a simple lack of understanding how interactive and non-interactive logins work in Unix. I added some script lines to the .bash_profile file on my CentOS box and found that these were not getting applied when I ssh’ed to that machine remotely. ssh uses a non-interactive login. Only interactive logins look at the .bash_profile file. .bashrc file gets invoked during non-interactive logins. As soon as I moved the steps to the .bashrc file, voila my lines were working beautifully.