第28节 sudo rootless


❤️💕💕记录sealosopen in new window开源项目的学习过程。k8s,docker和云原生的学习open in new window。Myblog:http://nsddd.topopen in new window


[TOC]

comment

  • https://github.com/cubxxw/sealer/blob/929ea57233cb1d7dac0564acc3846f2a85fe057d/utils/ssh/connect.go#L195

每一台主机:

echo "sealer ALL=(ALL) NOPASSWD: NOPASSWD: ALL" >> /etc/sudoers.d

提权:(0600)

ot@iZuf6h8zz5ck48kisvztrrZ ~]# ls -al /etc/ssh/sshd_config
-rw------- 1 root root 3797 Feb 14 17:10 /etc/ssh/sshd_config

# override default of no subsystems Subsystem sftp /usr/libexec/openssh/sftp-server

给与权限(node):

chmod 644 /etc/ssh/sshd_config

run:

sudo sealer run docker.io/sealerio/kubernetes:v1.22.15 --masters 10.0.0.245 --nodes 10.0.0.246 --nodes 10.0.0.247 --user sealer  --passwd  1234

END 链接