If you register in the ssh settings:
vim / etc / ssh / sshd_config
PermitRootLogin no
Can I login as root, but from a different name from the wheel group, for example "AdminVasia" , after I logged in as AdminVasia using the su root command?
the contents of the file /etc/ssh/sshd_config read at (re-) start and is taken to the management of the sshd program, the one that listens (by default) port 22 and allows you to connect to the computer via ssh .
The permitrootlogin directive with a value of no in this file indicates to the program that connections to this computer (using the ssh protocol) in which the root user is specified (such as ssh root@компьютер ) will not be accepted even if the correct root password is specified (during authentication by password) or (with key authentication), the correct secret key is presented, the public part of which is mentioned in the file /root/.ssh/authorized_keys .
neither the file in general nor the directive in particular has any relation to the work of the su program (and indeed any other besides sshd ).
Also, this directive has nothing to do with the wheel group (regardless of whether the root user is included in it or not), nor with any other group of users of this computer.
additional Read: $ man sshd_config
Source: https://ru.stackoverflow.com/questions/906059/
All Articles