I had this issue and landed here after searching. I wasn't ready to share my server credentials, so I decided to fix this by myself. Long story short, the fix is really simple. I faced this problem after switching root login from ssh password to ssh key only.
To fix this issue, go to Security screen > SSH tab > if you have this option off "SSH Password login", turn it on.
Go to terminal, create a new tab by clicking the plus sign, make sure the IP is "127.0.0.1" and the port the same as your SSH port, switch verification to Private Key, and past your key, then submit.
Now you go back to Security and turn off "SSH Password login".
These steps somehow fixed my issue, even the terminal on the mobile app.