V
V
Vyacheslav Kordienko2016-08-08 21:07:41
linux
Vyacheslav Kordienko, 2016-08-08 21:07:41

Disable ssh access as "root", but?

Hi all!
The question is painfully trivial.
But such a need arose:
There are users in the ROOT (0) group, and the root itself is actually included.
Actually disabling root"a:
in "/etc/ssh/sshd_config" set "PermitRootLogin no".
But other users with root rights and from the root group cannot connect via ssh and sftp
How to make sure that ssh is disabled only for the root user , and the rest of the root group could connect via ssh and sftp ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Danil Biryukov-Romanov, 2016-08-08
@urtow

No way.
Root is identified by ID 0, not by username.
PermitRootLogin denies access to the user with ID 0

S
Saboteur, 2016-08-08
@saboteur_kiev

Remove the password from the root user
, prohibit logging in as root
Configure the necessary users sudo
Everything. Everyone comes under him, if necessary - he uses sudo, and root himself as a separate interactive user is not needed, he is only needed to run init

C
CityCat4, 2016-08-09
@CityCat4

Giving ID 0 to several users is a hack and generally hell in terms of information security. Use sudo, and root login should be prohibited immediately after installing the system and setting up sudo, because several users with ID 0 are about the same as the whole family working on Windows under a single Administrator account and then being surprised that we rearrange this system once a month but it's still buggy...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question