The problem is that I really don't know if I am confused with PermitRootLogin or it is not working well.I put it in the sshd_config, and when I connect via ssh, I am able to do su - in order to have root permissions. So shouldn't PermitRootLogin no permit me that?
PermitRootLogin no in sshd config doesn't prevent `su -`
centos;ssh;root;su
PermitRootLogin only configures whether root can login directly via ssh (e.g. ssh root@example.com). When you login using a different user account, whatever you do in your shell is not influenced by sshd's config.From man sshd_config: PermitRootLogin     Specifies whether root can log in using ssh(1).  The argument must be yes, without-password, forced-commands-only, or no.  The default is yes.     []     If this option is set to no, root is not allowed to log in.You can however use your login.defs or pam config to limit which users can use the su command: Server Fault: Disable su on machine