diff --git a/scripts/clearCounter.sh b/scripts/clearCounter.sh new file mode 100644 index 0000000..aa444ed --- /dev/null +++ b/scripts/clearCounter.sh @@ -0,0 +1 @@ +rm -fr ~/counter/* diff --git a/scripts/createHostList.sh b/scripts/createHostList.sh new file mode 100644 index 0000000..d76f56f --- /dev/null +++ b/scripts/createHostList.sh @@ -0,0 +1 @@ +multipass list|cut -d ' ' -f1|grep -v "Name" |grep -v "^$" > hosts diff --git a/scripts/hosts b/scripts/hosts index 62ccb10..addb82e 100644 --- a/scripts/hosts +++ b/scripts/hosts @@ -2,3 +2,4 @@ us-mc02-pac-mp-ub2204-en0-microk8s-1 us-mc02-pac-mp-ub2204-en0-microk8s-2 us-mc02-pac-mp-ub2204-en0-microk8s-3 +us-mc02-pac-mp-ub2204-en0-microk8s-4 diff --git a/scripts/multipassInstallPreRequired.sh b/scripts/multipassInstallPreRequired.sh index 4eda82e..f87a7e3 100644 --- a/scripts/multipassInstallPreRequired.sh +++ b/scripts/multipassInstallPreRequired.sh @@ -10,12 +10,13 @@ multipass exec $host -- sudo adduser --system --shell /bin/bash --uid 905501 --gid 8055 adoss multipass exec $host -- sudo usermod -aG sudo aboss multipass exec $host -- sudo usermod -aG sudo aboss - multipass exec $host -- sudo passwd aboss - multipass exec $host -- sudo passwd adoss + multipass exec $host -- sudo sh -c "echo $root_password|sudo passwd aboss" + multipass exec $host -- echo sh -c "$root_password|sudo passwd adoss" multipass exec $host -- sudo sed -i "s/#PasswordAuthentication yes/PasswordAuthentication yes/" /etc/ssh/sshd_config multipass exec $host -- sudo sed -i "s/#PubkeyAuthentication yes/PubkeyAuthentication yes/" /etc/ssh/sshd_config multipass exec $host -- sudo sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin enabled/" /etc/ssh/sshd_config - multipass exec $host -- sudo ssh-keygen -t rsa -b 4096 -C "root" +# multipass exec $host -- sudo ssh-keygen -t rsa -b 4096 -C "root" + multipass exec $host -- sudo sh -c "sh-keygen -N '' -q -f ~/.ssh/id_rsa -t rsa -b 4096 -C root" # multipass exec $host -- sudo vim /etc/ssh/sshd_config # multipass exec $host -- sudo passwd # multipass exec $host -- sudo vim /root/.ssh/authorized_keys