Get the App
SLTechnology News&Howtos  ›  Servers  › 

Set ssh certificate login, prohibit root login, prohibit su to root,sudo permission settings

Shulou Source: shulou.com Published: 2022-06-02 11:24:26 09月30日 Update

First, set ssh certificate login, prohibit root login

Useradd newuserpasswd newuservim / etc/ssh/sshd_configPermitRootLogin noRSAAuthentication yesPubkeyAuthentication yesPasswordAuthentication noClientAliveInterval 30ClientAliveCountMax 5

II. Prohibition of su

Vim / etc/pam.d/suauth required pam_wheel.so use_uidvim / etc/login.defsSU_WHEEL_ONLY yes

III. Sudo permission setting

Chmod 640 / etc/sudoersvim / etc/sudoerslity ALL= (ALL) ALLchmod 440 / etc/sudoers

Tags: Login permissions certificates Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple Shulou Technology OPPO Reno MySQL