linux7非root用户添加虚拟网卡的设置

设置orchuser用户权限:

vi /etc/sudoers.d/orch
# Defaults !requiretty
orchuser ALL=(ALL) NOPASSWD: /usr/sbin/arping,/usr/sbin/ip,/bin/ping

 

建立服务器的互信:

ssh-keygen -t  rsa
cat id_rsa.pub >> authorized_keys

ssh node2 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh node3 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh orchestrator cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys

chmod 700 /home/orchuser/.ssh/*

ssh node1 date && ssh node2 date && ssh node3 date && ssh orchestrator date

 

测试orchuser用户添加vip:

su - orchuser

sudo ip addr add 192.168.66.144/24 dev enp0s3

 

相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页