V
V
Victor2015-02-10 01:10:26
linux
Victor, 2015-02-10 01:10:26

How to configure sudo to run without entering a password when using ssh keys?

I use ssh keys to login to remote machines. How to set up the system so as not to enter a password when sudoand how is this solution correct from a security point of view?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eddy_Em, 2015-02-10
@Eddy_Em

Immediately do ssh [email protected] Naturally, on that machine it is necessary to disable root authentication via ssh using a password, leaving only access by keys.
In my opinion, this is the most non-crutch way.
Well, either do NOPASSWD on sudo for this user. Only in this case, too, he will need to disable ssh by password.

A
Archie Kuznetsov, 2015-02-10
@Wolf4ara

How to configure the system to not enter a password when sudo:
/etc/sudoers
username ALL=(ALL) NOPASSWD: ALL
group:
%admins ALL=(ALL) NOPASSWD: ALL
--------------
And how much such decision is correct from the point of view of bezopastnost?
This is a multi-dimensional question, it depends on which user what functionality is provided. For example, our programmers do not have root, but there is one user who has been upgraded to which programmers have more rights to work with production. with this root, they do not become. Only admins are the root.

R
Roman Bazalevsky, 2015-02-10
@rvbglas

And NOPASSWD should not be set totally for all teams. On a pack of relatively safe - you can still.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question