I have a linux (debian based) server which is configured to allow SSH session to the user 'admin', but not the user 'root'. Both these accounts are linked somehow because they share the same password.
During an SSH session as admin, 'sudo' is required to run commands, unless I switch to the user 'root'.
I have some services on which I need to run now and then, or even at system startup. I'm currently using private/public key mechanism to remote execute commands on the server. Some of the commands are manually typed, others are shell scripts that I execute. Currently the server still asks for password when a command has uses sudo.
Question: How can remote execute as user 'admin' without supplying the password? Is it possible to use a private/public key to satisfy sudo? Or perhaps even a way to start shell scripts as the user 'root'?
Is it even possible to avoid having to type the password using sudo? If not, are they other alternatives for situation like mine?