测试:/usr/sbin/sshd -T

配置:
sh "chown root:root /etc/sudo.conf -R"
sh "chown -R root:root /etc/sudoers.d"
sh "chown root:root /etc/sudoers"
   sh "chown -R root /usr/libexec/sudo/"
sh "chmod 644 /usr/libexec/sudo/sudoers.so"
   sh "chmod 440 /etc/sudoers.d"
    sh "chmod 4755 /usr/bin/sudo"
    chmod -R 600 /etc/sudo.conf
    chmod -R 600 /etc/sudoers
    chown -R root:root /var/empty/sshd
    chmod -R 711 /var/empty/sshd
    chmod -R 600 /etc/ssh
 
ssh 免密登录:
chmod -R 700 /root/
chmod 600 /root/.ssh/id_dsa
chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_dsa.pub

 

posted on 2023-03-17 15:38  聪神carry  阅读(117)  评论(0编辑  收藏  举报