Login without running bash_profile or bashrc
ssh -t [email protected] /bin/sh works for me.
I've had the same problem, and somehow was able to solve it. I used ssh to access the system, and pressed and held Ctrl+c as soon as I logged into the system. Then, ~/.bashrc was not read, and I was able to modify it.
I think your only options are:
ssh in as another user and su to your account;
use something like ftp or smbclient, if the relevant services are enabled on the host;
find an open vulnerability in an open network service and exploit it :).
get an admin to fix the problem.
You need to a) start bash without
~/.bash_profile and b) since such a shell wouldn't be a full login shell / have no tty attached, force ssh to attach a tty:
ssh -t [email protected] bash --norc --noprofile
I used a published CVE to execute a command as root through a web interface in a network monitoring software I had installed.
Then I could login and svn revert the changes I made.