if
ssh host /bin/true
prints anything then you need to fix your dot-files.
wrap
around .bash_profile & .bashrc
Adding the code:
will only cause "lost connection" because they are being sourced by the login service.