diff --git a/aria-setup.sh b/aria-setup.sh index 9d00741..33cf18e 100755 --- a/aria-setup.sh +++ b/aria-setup.sh @@ -110,11 +110,12 @@ SSHEOF chmod 644 "$SSH_DIR/id_ed25519.pub" chmod 644 "$SSH_DIR/config" echo " Key generiert." - echo "" - echo " >>> ARIA's Public Key in root's authorized_keys auf der VM eintragen:" - echo " cat $SSH_DIR/id_ed25519.pub >> /root/.ssh/authorized_keys" - echo "" - read -p " Enter druecken wenn erledigt..." + # Public Key direkt in root's authorized_keys eintragen (Script laeuft als root auf der VM) + mkdir -p /root/.ssh + chmod 700 /root/.ssh + cat "$SSH_DIR/id_ed25519.pub" >> /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys + echo " Public Key in /root/.ssh/authorized_keys eingetragen." else echo " Key existiert bereits." fi