I have made an interactive shell for my Linux, and has chsh-ed to it to test it. However, it has a bug and I am now unable to get back to my bash/sh. I am not able to type in any command or perform any action to my machine.
I'm using Ubuntu 20.04.
I have tried to ssh into the machine with a parameter that tells it to run sh/bash, but it didn't seem to work and falls back to the shell that I have made.
This is what I have tried:
ssh username@hostname -p 2222 bash
ssh username@hostname -p 2222 -t bash
My root account has no password and therefore is not activated (I think) and I do not have another user account to do the chsh for me.
How do I force my machine to use Sh or Bash on a tty so that I can fix my shell and use my machine?
Or just any way to get me out from my shell other then reinstalling my computer?