创建bigops用户

useradd bigops
passwd bigops

授权sudo权限

运行visudo,文件末尾添加

Defaults:bigops !requiretty
bigops ALL=(ALL) NOPASSWD: ALL,!/usr/bin/rm

或者指定可执行目录

Defaults:bigops !requiretty
bigops ALL=(ALL) NOPASSWD: /bin/*,/sbin/*,/usr/bin/*,/usr/sbin/*,/opt/bigops/bigagent/bin/*,/opt/exporter/*,!/usr/bin/rm

增加ssh并发连接

修改配置并测试配置文件正确性,没有输出就是正确

sed -i 's/#MaxSessions.*/MaxSessions 200/g' /etc/ssh/sshd_config
/usr/sbin/sshd -t

重启sshd

service sshd reload

results matching ""

    No results matching ""