There is an option to circumvent the password prompted by sudo command.
First login as "root", the execute visudo then you need to provide "NOPASSWD:ALL" and the end of the line for the user. Something like this:
Code:
admin ALL=(ALL) NOPASSWD: ALL
This will allow admin user to perform all the task with the root access without prompting the password.
This approach is not good as it makes user admin as powerful as root.
Moral of the story is to use "NOPASSWD:" prefix for the commands.
Hope this will solve the problem with the password prompt.
Next, it is always helpful to block the root user from directly log in remotely. To do so, edit the sshd configuration file, for the rpm based operating systems it is at /etc/sshd/sshd_config
Enable the
Do not forget to reload/restart the sshd service.