README: Improve cluster formation docs
- Begin code block with sudo to remind the following shall be ran as root. - Remove hardcoded key, instead copy from ubutnu user.
This commit is contained in:
parent
34369d211b
commit
d2a719af43
@ -161,6 +161,8 @@ Added some ARM64 workers by using Ubuntu 22.04 server on Raspberry Pi.
|
|||||||
After machines have booted up and you can reach them via SSH:
|
After machines have booted up and you can reach them via SSH:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
sudo -i
|
||||||
|
|
||||||
# Enable required kernel modules
|
# Enable required kernel modules
|
||||||
cat > /etc/modules << EOF
|
cat > /etc/modules << EOF
|
||||||
overlay
|
overlay
|
||||||
@ -200,10 +202,8 @@ systemctl disable --now multipathd snapd bluetooth ModemManager hciuart wpa_supp
|
|||||||
# Permit root login
|
# Permit root login
|
||||||
sed -i -e 's/PermitRootLogin no/PermitRootLogin without-password/' /etc/ssh/sshd_config
|
sed -i -e 's/PermitRootLogin no/PermitRootLogin without-password/' /etc/ssh/sshd_config
|
||||||
systemctl reload ssh
|
systemctl reload ssh
|
||||||
cat << EOF > /root/.ssh/authorized_keys
|
cat ~ubuntu/.ssh/authorized_keys > /root/.ssh/authorized_keys
|
||||||
sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBD4/e9SWYWYoNZMkkF+NirhbmHuUgjoCap42kAq0pLIXFwIqgVTCre03VPoChIwBClc8RspLKqr5W3j0fG8QwnQAAAAEc3NoOg== lauri@lauri-x13
|
userdel -fr ubuntu
|
||||||
EOF
|
|
||||||
userdel -f ubuntu
|
|
||||||
apt-get install -yqq linux-image-generic
|
apt-get install -yqq linux-image-generic
|
||||||
apt-get remove -yq cloud-init linux-image-*-kvm
|
apt-get remove -yq cloud-init linux-image-*-kvm
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user