diff --git a/src/run.sh b/src/run.sh index 39fa722..ecea81c 100755 --- a/src/run.sh +++ b/src/run.sh @@ -120,6 +120,10 @@ if ask_yesno "Install Docker?"; then source ./steps-config/10-docker.sh; fi +if ask_yesno "Add Laminar CI SSH public key to root authorized_keys?"; then + source ./steps-config/80-laminar-ssh.sh; +fi + ### # Autonomous config tasks diff --git a/src/steps-config/80-laminar-ssh.sh b/src/steps-config/80-laminar-ssh.sh new file mode 100755 index 0000000..71d7cee --- /dev/null +++ b/src/steps-config/80-laminar-ssh.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +task_begin "Adding Laminar CI SSH key"; + +mkdir -p /root/.ssh; +echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICzYSWsGbWHh+cDheHJSKlCrxYDLwS6SKwVMV9SAaGsO laminar-ci@elessar" >>/root/.ssh/authorized_keys; + +# Set permissions +sudo chown -R root:root /root/.ssh; +sudo chmod 0600 /root/.ssh/authorized_keys; + +task_end "$?";