Answer the question
In order to leave comments, you need to log in
How to setup sudo without password when using key authentication?
Is it possible, when connecting via ssh using a key, to get sudo by entering the password from the local machine?
I don't want to disable the password.
How do you solve this problem?
Answer the question
In order to leave comments, you need to log in
ssh by key only gives you the ability to connect to the desired machine.
Sudo is a separate entity. It can elevate privileges with either a password (default) or no password (option NOPASSWD:). By default, the password will be taken from the machine to which you are connected (file with password hash /etc/shadow). If you set up authorization through LDAP, then you can pull it up from there.
If you meant whether it is possible to enter the password from the machine from which you are connecting, then no, since the machine where you connected does not know anything about the password database of the local machine where the connection was from. Only centralized password storage will help here, for example, as I wrote above in AD \ LDAP.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question