I have an application running on a dedicated (Ubuntu) server. There is also a desktop GUI which functions as dashboard for the application. I want to be able to start and stop the application from the GUI. To stop it, I simply send a command to the applications which makes it end its execution.
Starting however is not so simple. I want to use a small bash-script for it, however I do not know how I can securely invoke the script on a remote server from a client machine. Assuming the client machine gets compromised, I do not want to have anything happen to the remote machine (for example stolen SSH credentials for a user who can upload/download/execute files on the remote machine).
How can I securely invoke that script?