I have a remote linux system that I can connect to via ssh and public key and then execute the following command:
sudo jetty restart
This command on this system is configured to allow anyone to execute without the sudo password. I.e. the sudoers file probably looks something like this
%develop ALL = NOPASSWD: /opt/scripts/jetty
This is great as we can execute this script with elevated privileges while keeping everything else locked down. The problem is when trying to execute this command remotely, I am always asked for the sudo password.
me@home:~$ ssh -t -i ~/.ssh/identity email@example.com 'sudo jetty restart' Password: .....? (I don't have the sudo password!)
Is there a way I can execute this command remotely?