Hello, I am running a Ubuntu 18.04.3 server with Plex Media Server and I created a remote access shell with Ajenti, which allowed me to control my server remotely. After attempting to install a plugin, Ajenti crashed and did not restart. Since I was stupid enough to not port forward port 22, I am unable to access the computer via a shell. My only way left to connect to the server is Plex, and I am wondering if there is any way to open a shell from the Plex remote web interface, or somehow execute a command remotely so that I can restart the remote access shell. Any ideas would be much appreciated, fully articulated or not. Thank you for reading and in advance or anything you may offer!
No. Such a capability would be a huge security risk.
Wherever your host is, it appears you now need physical access or access via another admin-level tool.
you should never ever open port 22/ssh, at least not without extremely good security practices in place.
you are better off establishing a proper VPN layer and using that to manage remote access, via ssh or server web mgmt or RDP etc.
If you set up ssh to auth with certificate + login/pass (ie, same security setup a VPN uses) there’s no need to get paranoid about port 22, but yes, dicking around with ssh using user “root” password “password123” is a very very bad idea.
That said, NAT Mapping internal port 22 to a randomly chosen external port number is not a crazy idea either.