Prepare a minimal and functional .bashrc file locally and transfer it to the remote system using scp, sftp, rsync or by any other available way.
For example:
$ mkdir testing && cd testing $ touch empty-bashrc $ ssh username@remotehost mv .bashrc broken-bashrc $ scp empty-bashrc username@remotehost:.bashrc Depending on the way you have set up your shell on the remote machine, it may be enough to move the broken .bashrc out of the way. Alternatively, you may have to replace it rather than move it out of the way to not make the SSH shell session break. Only you know the way you've configured it.