I'm using a GNU/Linux system remotely, via SSH.
I mistakenly added something into my $HOME/.bash_profile
scriot which causes an error. (To be specific: I added an exec foo
command instead of . foo
, applied to another bash script without execution permissions, which results in an error.)
Now I can't seem to SSH, SCP or SFTP into my machine: bash, my login shell, tries to run the exec foo
command, gets the error and throws me out! I don't have any other account I can access remotely.
Is there something I can do to restore access to the system?
Additional details:
- Most ports other than for SSH are unavailable since the machine is behind a firewall.
- It's a Devuan 3 ASCII (~= Debian 10 Beowulf) system.